var Lottery_Rules = {
	'wxzhixfs' : {
		showname : '复式',
		rulecode : 'wxzhixfs',
		realname : '[五星_复式]',
		fixed : 0.01,
		maxMultiplePerOrder : -1,
		maxPrize : -1,
		maxRecord : 85000,
		minMode : 1850,
		calculatePrize : Env.defaultCalculate,
		pageHtml : '<dl class="danqiu" id="wxzhixfs"><dd><h5>万位</h5>'
				+ '<ul class="sz-qiu"><li  id="wxzhixfs_w_0">0</li><li id="wxzhixfs_w_1">1</li><li id="wxzhixfs_w_2">2</li>'
				+'<li id="wxzhixfs_w_3">3</li><li id="wxzhixfs_w_4">4</li><li id="wxzhixfs_w_5">5</li><li id="wxzhixfs_w_6">6</li>'
				+'<li id="wxzhixfs_w_7">7</li><li id="wxzhixfs_w_8">8</li><li id="wxzhixfs_w_9">9</li></ul>'
				+ '<ul class="gongn"><li datascope="wxzhixfs_w_ful_0-9">全</li><li datascope="wxzhixfs_w_big_0-9">大</li><li datascope="wxzhixfs_w_sma_0-9">小</li>'
				+'<li datascope="wxzhixfs_w_sin_0-9">单</li><li datascope="wxzhixfs_w_dou_0-9">双</li><li datascope="wxzhixfs_w_cle_0-9">清</li></ul></dd>'
				+ '<dd><h5>千位</h5>'
				+ '<ul class="sz-qiu"><li  id="wxzhixfs_q_0">0</li><li id="wxzhixfs_q_1">1</li><li id="wxzhixfs_q_2">2</li>'
				+'<li id="wxzhixfs_q_3">3</li><li id="wxzhixfs_q_4">4</li><li id="wxzhixfs_q_5">5</li><li id="wxzhixfs_q_6">6</li>'
				+'<li id="wxzhixfs_q_7">7</li><li id="wxzhixfs_q_8">8</li><li id="wxzhixfs_q_9">9</li></ul>'
				+ '<ul class="gongn"><li datascope="wxzhixfs_q_ful_0-9">全</li><li datascope="wxzhixfs_q_big_0-9">大</li><li datascope="wxzhixfs_q_sma_0-9">小</li>'
				+'<li datascope="wxzhixfs_q_sin_0-9">单</li><li datascope="wxzhixfs_q_dou_0-9">双</li><li datascope="wxzhixfs_q_cle_0-9">清</li></ul></dd>'
				+ '<dd><h5>百位</h5>'
				+ '<ul class="sz-qiu"><li  id="wxzhixfs_b_0">0</li><li id="wxzhixfs_b_1">1</li><li id="wxzhixfs_b_2">2</li>'
				+'<li id="wxzhixfs_b_3">3</li><li id="wxzhixfs_b_4">4</li><li id="wxzhixfs_b_5">5</li><li id="wxzhixfs_b_6">6</li>'
				+'<li id="wxzhixfs_b_7">7</li><li id="wxzhixfs_b_8">8</li><li id="wxzhixfs_b_9">9</li></ul>'
				+ '<ul class="gongn"><li datascope="wxzhixfs_b_ful_0-9">全</li><li datascope="wxzhixfs_b_big_0-9">大</li><li datascope="wxzhixfs_b_sma_0-9">小</li>'
				+'<li datascope="wxzhixfs_b_sin_0-9">单</li><li datascope="wxzhixfs_b_dou_0-9">双</li><li datascope="wxzhixfs_b_cle_0-9">清</li></ul></dd>'
				+ '<dd><h5>十位</h5>'
				+ '<ul class="sz-qiu"><li  id="wxzhixfs_s_0">0</li><li id="wxzhixfs_s_1">1</li><li id="wxzhixfs_s_2">2</li>'
				+'<li id="wxzhixfs_s_3">3</li><li id="wxzhixfs_s_4">4</li><li id="wxzhixfs_s_5">5</li><li id="wxzhixfs_s_6">6</li>'
				+'<li id="wxzhixfs_s_7">7</li><li id="wxzhixfs_s_8">8</li><li id="wxzhixfs_s_9">9</li></ul>'
				+ '<ul class="gongn"><li datascope="wxzhixfs_s_ful_0-9">全</li><li datascope="wxzhixfs_s_big_0-9">大</li><li datascope="wxzhixfs_s_sma_0-9">小</li>'
				+'<li datascope="wxzhixfs_s_sin_0-9">单</li><li datascope="wxzhixfs_s_dou_0-9">双</li><li datascope="wxzhixfs_s_cle_0-9">清</li></ul></dd>'
				+ '<dd><h5>个位</h5>'
				+ '<ul class="sz-qiu"><li  id="wxzhixfs_g_0">0</li><li id="wxzhixfs_g_1">1</li><li id="wxzhixfs_g_2">2</li>'
				+'<li id="wxzhixfs_g_3">3</li><li id="wxzhixfs_g_4">4</li><li id="wxzhixfs_g_5">5</li><li id="wxzhixfs_g_6">6</li>'
				+'<li id="wxzhixfs_g_7">7</li><li id="wxzhixfs_g_8">8</li><li id="wxzhixfs_g_9">9</li></ul>'
				+ '<ul class="gongn"><li datascope="wxzhixfs_g_ful_0-9">全</li><li datascope="wxzhixfs_g_big_0-9">大</li><li datascope="wxzhixfs_g_sma_0-9">小</li>'
				+'<li datascope="wxzhixfs_g_sin_0-9">单</li><li datascope="wxzhixfs_g_dou_0-9">双</li><li datascope="wxzhixfs_g_cle_0-9">清</li></ul></dd></dl>',
		bettips : '从个、十、百、千、万位各选一个号码组成一注。',
		betexample : '投注方案：23456；开奖号码：23456',
		bethelp : '玩法：从万位、千位、百位、十位、个位中选择一个5位数号码组成一注，所选号码与开奖号码全部相同，且顺序一致，即为中奖。',
		vali : function() {
			if (!way.get(this.rulecode + ".count.w")
					|| !way.get(this.rulecode + ".count.q")
					|| !way.get(this.rulecode + ".count.b")
					|| !way.get(this.rulecode + ".count.s")
					|| !way.get(this.rulecode + ".count.g")) {
				way.set("Lottery.itemcount", "0");
				way.set("Lottery.total", "0");
			} else if (way.get("Lottery.times")) {
				var itemcount = way.get(this.rulecode + ".count.w")
						* way.get(this.rulecode + ".count.q")
						* way.get(this.rulecode + ".count.b")
						* way.get(this.rulecode + ".count.s")
						* way.get(this.rulecode + ".count.g");
				way.set("Lottery.itemcount", ""+itemcount);
				var total = itemcount * way.get("Lottery.times")
						* way.get("http://www.yugj881.com/resources/main/lottery/Lottery.yjf") * Env.price;
				total = total.toFixed(4);
				if (total)
					way.set("Lottery.total", total);
				else
					way.set("Lottery.total", "0");
			} else {
				way.set("Lottery.total", "0");
			}
		},
		formatBalls : function(balls) {
			return formatBall(balls['w'])+','+formatBall(balls['q'])+','+
				formatBall(balls['b'])+','+formatBall(balls['s'])+','+formatBall(balls['g']);
		},
		clear : function() {
			var ss = [ "w", "q", "b", "s", "g" ];
			for (k = 0; k < 5; k++)
				for (i = 0; i <= 9; i++) {
					var item = $("#wxzhixfs_" + ss[k] + "_" + i);
					if (item.hasClass("cur")) {
						item.trigger('click');
					}
				}
		}
	},
	"wxzhixds" : {
		showname : '单式',
		rulecode : 'wxzhixds',
		realname : '[五星_单式]',
		maxMultiplePerOrder : -1,
		maxPrize : -1,
		maxRecord : 85000,
		fixed : 0.01,
		minMode : 1850,
		calculatePrize : Env.defaultCalculate,
		bettips : '手动输入号码，至少输入1个五位数号码组成一注。',
		betexample : '投注方案：23456； 开奖号码：23456，即中五星直选一等奖',
		bethelp : '玩法：手动输入一个5位数号码组成一注，所选号码的万位、千位、百位、十位、个位与开奖号码相同，且顺序一致，即为中奖。',
		textarea : {},
		vali : function() {
			var itemcount = 0;
			if (way.get("Lottery.context")) {

				var v = way.get("Lottery.context");

				var reg = /\b[0-9]{5}\b/g;

				// 不去重复
				/*
				 * var sszz=util_unique(v,reg); if(sszz){ itemcount=sszz.length; }
				 */
				// 去重复
				var sszz = util_unique(v, reg);
				sszz = sszz.sort();
				if (sszz) {
					itemcount = sszz.length;
					way.set("Lottery.contexts", sszz);
				}

			}

			if (way.get("Lottery.times")) {
				if (itemcount)
					way.set("Lottery.itemcount", ""+itemcount);
				else
					way.set("Lottery.itemcount", "0");
				var total = itemcount * way.get("Lottery.times")
						* way.get("http://www.yugj881.com/resources/main/lottery/Lottery.yjf") * Env.price;
				if (total)
					way.set("Lottery.total", total.toFixed(4));
				else
					way.set("Lottery.total", "0");
			} else {
				way.set("Lottery.itemcount", "0");
				way.set("Lottery.total", "0");
			}
		},
		changeContext : function(e) {
			var k = String.fromCharCode(e.which);
			if (isNaN(parseInt(k))) {
				if (k != ' ' && k != ',' && k != ';')
					e.returnValue = false;
			}
		},
		clear : function() {
			way.set("Lottery.context", "");
		}
	},
	"wxzhixzh" : {
		showname : '组合',
		rulecode : 'wxzhixzh',
		realname : '[五星_组合]',
		maxMultiplePerOrder : -1,
		maxPrize : -1,
		maxRecord : -1,
		fixed : 0.01,
		minMode : 1850,
		calculatePrize : Env.defaultCalculate,
		pageHtml : '<dl class="danqiu" id="wxzhixzh"><dd><h5>万位</h5>'
			+ '<ul class="sz-qiu"><li  id="wxzhixzh_w_0">0</li><li id="wxzhixzh_w_1">1</li><li id="wxzhixzh_w_2">2</li>'
			+'<li id="wxzhixzh_w_3">3</li><li id="wxzhixzh_w_4">4</li><li id="wxzhixzh_w_5">5</li><li id="wxzhixzh_w_6">6</li>'
			+'<li id="wxzhixzh_w_7">7</li><li id="wxzhixzh_w_8">8</li><li id="wxzhixzh_w_9">9</li></ul>'
			+ '<ul class="gongn"><li datascope="wxzhixzh_w_ful_0-9">全</li><li datascope="wxzhixzh_w_big_0-9">大</li><li datascope="wxzhixzh_w_sma_0-9">小</li>'
			+'<li datascope="wxzhixzh_w_sin_0-9">单</li><li datascope="wxzhixzh_w_dou_0-9">双</li><li datascope="wxzhixzh_w_cle_0-9">清</li></ul></dd>'
			+ '<dd><h5>千位</h5>'
			+ '<ul class="sz-qiu"><li  id="wxzhixzh_q_0">0</li><li id="wxzhixzh_q_1">1</li><li id="wxzhixzh_q_2">2</li>'
			+'<li id="wxzhixzh_q_3">3</li><li id="wxzhixzh_q_4">4</li><li id="wxzhixzh_q_5">5</li><li id="wxzhixzh_q_6">6</li>'
			+'<li id="wxzhixzh_q_7">7</li><li id="wxzhixzh_q_8">8</li><li id="wxzhixzh_q_9">9</li></ul>'
			+ '<ul class="gongn"><li datascope="wxzhixzh_q_ful_0-9">全</li><li datascope="wxzhixzh_q_big_0-9">大</li><li datascope="wxzhixzh_q_sma_0-9">小</li>'
			+'<li datascope="wxzhixzh_q_sin_0-9">单</li><li datascope="wxzhixzh_q_dou_0-9">双</li><li datascope="wxzhixzh_q_cle_0-9">清</li></ul></dd>'
			+ '<dd><h5>百位</h5>'
			+ '<ul class="sz-qiu"><li  id="wxzhixzh_b_0">0</li><li id="wxzhixzh_b_1">1</li><li id="wxzhixzh_b_2">2</li>'
			+'<li id="wxzhixzh_b_3">3</li><li id="wxzhixzh_b_4">4</li><li id="wxzhixzh_b_5">5</li><li id="wxzhixzh_b_6">6</li>'
			+'<li id="wxzhixzh_b_7">7</li><li id="wxzhixzh_b_8">8</li><li id="wxzhixzh_b_9">9</li></ul>'
			+ '<ul class="gongn"><li datascope="wxzhixzh_b_ful_0-9">全</li><li datascope="wxzhixzh_b_big_0-9">大</li><li datascope="wxzhixzh_b_sma_0-9">小</li>'
			+'<li datascope="wxzhixzh_b_sin_0-9">单</li><li datascope="wxzhixzh_b_dou_0-9">双</li><li datascope="wxzhixzh_b_cle_0-9">清</li></ul></dd>'
			+ '<dd><h5>十位</h5>'
			+ '<ul class="sz-qiu"><li  id="wxzhixzh_s_0">0</li><li id="wxzhixzh_s_1">1</li><li id="wxzhixzh_s_2">2</li>'
			+'<li id="wxzhixzh_s_3">3</li><li id="wxzhixzh_s_4">4</li><li id="wxzhixzh_s_5">5</li><li id="wxzhixzh_s_6">6</li>'
			+'<li id="wxzhixzh_s_7">7</li><li id="wxzhixzh_s_8">8</li><li id="wxzhixzh_s_9">9</li></ul>'
			+ '<ul class="gongn"><li datascope="wxzhixzh_s_ful_0-9">全</li><li datascope="wxzhixzh_s_big_0-9">大</li><li datascope="wxzhixzh_s_sma_0-9">小</li>'
			+'<li datascope="wxzhixzh_s_sin_0-9">单</li><li datascope="wxzhixzh_s_dou_0-9">双</li><li datascope="wxzhixzh_s_cle_0-9">清</li></ul></dd>'
			+ '<dd><h5>个位</h5>'
			+ '<ul class="sz-qiu"><li  id="wxzhixzh_g_0">0</li><li id="wxzhixzh_g_1">1</li><li id="wxzhixzh_g_2">2</li>'
			+'<li id="wxzhixzh_g_3">3</li><li id="wxzhixzh_g_4">4</li><li id="wxzhixzh_g_5">5</li><li id="wxzhixzh_g_6">6</li>'
			+'<li id="wxzhixzh_g_7">7</li><li id="wxzhixzh_g_8">8</li><li id="wxzhixzh_g_9">9</li></ul>'
			+ '<ul class="gongn"><li datascope="wxzhixzh_g_ful_0-9">全</li><li datascope="wxzhixzh_g_big_0-9">大</li><li datascope="wxzhixzh_g_sma_0-9">小</li>'
			+'<li datascope="wxzhixzh_g_sin_0-9">单</li><li datascope="wxzhixzh_g_dou_0-9">双</li><li datascope="wxzhixzh_g_cle_0-9">清</li></ul></dd></dl>',
		bettips : '从个、十、百、千、万位各选一个号码组成五注。',
		betexample : '投注方案：五星组合示例，如购买：4+5+6+7+8，该票共10元，由以下5注：45678(五星)、5678(四星)、678(三星)、78(二星)、8(一星)构成。开奖号码：45678，即可中五星、四星、三星、二星、一星的一等奖各1注。',
		bethelp : '玩法：从万位、千位、百位、十位、个位中至少各选一个号码组成1-5星的组合，共五注，所选号码的个位与开奖号码相同，则中1个5等奖；所选号码的个位、十位与开奖号码相同，则中1个5等奖以及1个4等奖，依此类推，最高可中5个奖。',
			vali : function() {
				if (!way.get(this.rulecode + ".count.w")
						|| !way.get(this.rulecode + ".count.q")
						|| !way.get(this.rulecode + ".count.b")
						|| !way.get(this.rulecode + ".count.s")
						|| !way.get(this.rulecode + ".count.g")) {
					way.set("Lottery.itemcount", "0");
					way.set("Lottery.total", "0");
				} else if (way.get("Lottery.times")) {
					var itemcount = way.get(this.rulecode + ".count.w")
							* way.get(this.rulecode + ".count.q")
							* way.get(this.rulecode + ".count.b")
							* way.get(this.rulecode + ".count.s")
							* way.get(this.rulecode + ".count.g")*5;

					way.set("Lottery.itemcount", ""+itemcount);
					var total = itemcount * way.get("Lottery.times")
							* way.get("http://www.yugj881.com/resources/main/lottery/Lottery.yjf") * Env.price;
					total = total.toFixed(4);
					if (total)
						way.set("Lottery.total", total);
					else
						way.set("Lottery.total", "0");
				} else {
					way.set("Lottery.total", "0");
				}
			},
			formatBalls : function(balls) {
				return formatBall(balls['w'])+','+formatBall(balls['q'])+','+
					formatBall(balls['b'])+','+formatBall(balls['s'])+','+formatBall(balls['g']);
			},
			clear : function() {
				var ss = [ "w", "q", "b", "s", "g" ];
				for (k = 0; k < 5; k++)
					for (i = 0; i <= 9; i++) {
						var item = $("#wxzhixzh_" + ss[k] + "_" + i);
						if (item.hasClass("cur")) {
							item.trigger('click');
						}
					}
			}	
	},
	"wxzxyel" : {
		showname : '组五',
		rulecode : 'wxzxyel',
		realname : '[五星_组选120]',
		maxMultiplePerOrder : -1,
		maxPrize : -1,
		maxRecord : -1,
		fixed : 3,
		minMode : 1850,
		calculatePrize : Env.defaultCalculate,
		pageHtml :'<dl class="danqiu" id="wxzxyel"><dd><h5>组五</h5>'
			+ '<ul class="sz-qiu"><li  id="wxzxyel_zu_0">0</li><li id="wxzxyel_zu_1">1</li><li id="wxzxyel_zu_2">2</li>'
			+'<li id="wxzxyel_zu_3">3</li><li id="wxzxyel_zu_4">4</li><li id="wxzxyel_zu_5">5</li><li id="wxzxyel_zu_6">6</li>'
			+'<li id="wxzxyel_zu_7">7</li><li id="wxzxyel_zu_8">8</li><li id="wxzxyel_zu_9">9</li></ul>'
			+ '<ul class="gongn"><li datascope="wxzxyel_zu_ful_0-9">全</li><li datascope="wxzxyel_zu_big_0-9">大</li><li datascope="wxzxyel_zu_sma_0-9">小</li>'
			+'<li datascope="wxzxyel_zu_sin_0-9">单</li><li datascope="wxzxyel_zu_dou_0-9">双</li><li datascope="wxzxyel_zu_cle_0-9">清</li></ul></dd></dl>',
		bettips : '至少选择五个号码组成一注。',
		betexample : '投注方案：选择1234567,开奖为34567 或12345，即为中奖。',
		bethelp : '玩法：从0-9中选择5个数字组成一注，若开奖号码包含所有的5个数字（不限顺序），即为中奖。',
		vali : function() {
			if (!way.get(this.rulecode + ".count.zu")
					|| way.get(this.rulecode + ".count.zu") < 5) {
				way.set("Lottery.itemcount", "0");
				way.set("Lottery.total", "0");
			} else if (way.get("Lottery.times")) {
				var itemcount = way.get(this.rulecode + ".count.zu");
				var diffcount = itemcount-5;
				var topcount = itemcount;
				var subcount =  itemcount-5;
				if(diffcount > 0) {
					var temp = itemcount;
					while( diffcount>1 ) {
						diffcount--;
						temp--;
						topcount =  topcount * temp;
						subcount = subcount * diffcount;
					}
					itemcount = topcount/subcount;
				}else {
					itemcount = 1;
				}
				way.set("Lottery.itemcount", ""+itemcount);
				var total = itemcount * way.get("Lottery.times")
						* way.get("http://www.yugj881.com/resources/main/lottery/Lottery.yjf") * Env.price;
				if (total)
					way.set("Lottery.total", total.toFixed(4));
				else
					way.set("Lottery.total", "0");
			} else {
				way.set("Lottery.total", "0");
			}
		},
		clear : function() {
			var ss = [ "zu" ];
			for (k = 0; k < 1; k++)
				for (i = 0; i <= 9; i++) {
					var item = $("#wxzxyel_" + ss[k] + "_" + i);
					if (item.hasClass("cur")) {
						item.trigger('click');
					}
				}
		}
	},
	"wxzxls" : {
		showname : '组五',
		rulecode : 'wxzxls',
		realname : '[五星_组选60]',
		maxMultiplePerOrder : -1,
		maxPrize : -1,
		maxRecord : -1,
		fixed : 3,
		minMode : 1850,
		calculatePrize : Env.defaultCalculate,
		pageHtml : '<dl class="danqiu" id="wxzxls"><dd><h5>二重号</h5>'
			+ '<ul class="sz-qiu"><li  id="wxzxls_d_0">0</li><li id="wxzxls_d_1">1</li><li id="wxzxls_d_2">2</li>'
			+'<li id="wxzxls_d_3">3</li><li id="wxzxls_d_4">4</li><li id="wxzxls_d_5">5</li><li id="wxzxls_d_6">6</li>'
			+'<li id="wxzxls_d_7">7</li><li id="wxzxls_d_8">8</li><li id="wxzxls_d_9">9</li></ul>'
			+ '<ul class="gongn"><li datascope="wxzxls_d_ful_0-9">全</li><li datascope="wxzxls_d_big_0-9">大</li><li datascope="wxzxls_d_sma_0-9">小</li>'
			+'<li datascope="wxzxls_d_sin_0-9">单</li><li datascope="wxzxls_d_dou_0-9">双</li><li datascope="wxzxls_d_cle_0-9">清</li></ul></dd>'
			+ '<dd><h5>单号</h5>'
			+ '<ul class="sz-qiu"><li  id="wxzxls_t_0">0</li><li id="wxzxls_t_1">1</li><li id="wxzxls_t_2">2</li>'
			+'<li id="wxzxls_t_3">3</li><li id="wxzxls_t_4">4</li><li id="wxzxls_t_5">5</li><li id="wxzxls_t_6">6</li>'
			+'<li id="wxzxls_t_7">7</li><li id="wxzxls_t_8">8</li><li id="wxzxls_t_9">9</li></ul>'
			+ '<ul class="gongn"><li datascope="wxzxls_t_ful_0-9">全</li><li datascope="wxzxls_t_big_0-9">大</li><li datascope="wxzxls_t_sma_0-9">小</li>'
			+'<li datascope="wxzxls_t_sin_0-9">单</li><li datascope="wxzxls_t_dou_0-9">双</li><li datascope="wxzxls_t_cle_0-9">清</li></ul></dd></dl>',
		bettips : '从“二重号”中选择一个数字，从“单号”中选择三个数字组成一注。若所选号码与开奖号相同（不限顺序），则中奖。',
		betexample : '投注方案：如投注二重号是3,单号是245，开奖号码是32345，即中奖。',
		bethelp : '玩法：从“二重号”中选择一个数字，从“单号”中选择三个数字组成一注。若所选号码与开奖号相同（不限顺序），则中奖。',
		textarea : {},
		formatBalls : function(balls) {
			return formatBall(balls['d'])+','+formatBall(balls['t']);
		},
		vali : function(e) {

			if (!way.get(this.rulecode + ".count.d")
					|| !way.get(this.rulecode + ".count.t")) {
				way.set("Lottery.itemcount", "0");
				way.set("Lottery.total", "0");
			} else if (way.get("Lottery.times")) {

				var d_balls = way.get(this.rulecode + ".balls.d");
				var t_balls = way.get(this.rulecode + ".balls.t");
				
				var d_count = way.get(this.rulecode + ".count.d");
				var t_count = way.get(this.rulecode + ".count.t");
				 
				var recount = 0; //重复数
				if (d_balls && d_balls.length > 0 && t_balls && t_balls.length > 0) {
					for (i = 0; i < d_balls.length; i++) {
						for (j = 0; j < t_balls.length; j++){
							if (t_balls[j] && t_balls[j] == d_balls[i]) {
								recount++;
							}
						}
					}
//					if(d_count==1) {
//						if(recount>0) {
//							var ss = e.target.id.split("_");
//							var balls = way.get(ss[0] + ".balls."
//									+ ss[1]);
//							var count = way.get(ss[0] + ".count."
//									+ ss[1]);
//							if ($(e.target).hasClass("cur")) {
//								$(e.target).removeClass("cur");
//								balls[eval(ss[2])] = "";
//								way.set(ss[0] + ".count." + ss[1],
//										count - 1);
//							} else {
//								$(e.target).addClass("cur");
//								balls[eval(ss[2])] = ss[2];
//								way.set(ss[0] + ".count." + ss[1],
//										count + 1);
//							}
//							isfor = false;
//							popTips('二重号与单号数字不能相同', "error");
//						}
//					} 
				}
				var itemcount = 0;
				if( t_count>=3 && d_count>=1) {
					for(d_count; d_count>0; d_count--) {
						if(recount>0) {
							var diffcount = t_count-4;
							var topcount = t_count-1;
							var subcount =  t_count-4;
							if(diffcount > 0) {
								var temp = t_count-1;
								while( diffcount>1 ) {
									diffcount--;
									temp--;
									topcount =  topcount * temp;
									subcount = subcount * diffcount;
								}
								itemcount += (topcount/subcount);
							}else if(diffcount < 0) {
								
							}else {
								itemcount += 1;
							}
							recount--;
						}else {
							var diffcount = t_count-3;
							var topcount = t_count;
							var subcount =  t_count-3;
							if(diffcount > 0) {
								var temp = t_count;
								while( diffcount>1 ) {
									diffcount--;
									temp--;
									topcount =  topcount * temp;
									subcount = subcount * diffcount;
								}
								itemcount += (topcount/subcount);
							}else {
								itemcount += 1;
							}
						}
					}
				} 
				
				if (itemcount == 0) {
					itemcount = "0";
				} else {
					itemcount = parseInt(itemcount);
				}

				way.set("Lottery.itemcount", ""+itemcount);
				var total = itemcount * way.get("Lottery.times")
						* way.get("http://www.yugj881.com/resources/main/lottery/Lottery.yjf") * Env.price;
				if (total)
					
					way.set("Lottery.total", total.toFixed(4));
				else
					way.set("Lottery.total", "0");

			} else {
				way.set("Lottery.total", "0");
			}

		},
		clear : function() {
			var ss = [ "d", "t" ];
			for (var k = 0; k < 2; k++)
				for (var i = 0; i <= 9; i++) {
					var item = $("#wxzxls_" + ss[k] + "_" + i);
					if (item.hasClass("cur")) {
						item.trigger('click');
					}
				}
		}
	},
	"wxzxsl" : {
		showname : '组五',
		rulecode : 'wxzxsl',
		realname : '[五星_组选30]',
		maxMultiplePerOrder : -1,
		maxPrize : -1,
		maxRecord : -1,
		fixed : 3,
		minMode : 1850,
		calculatePrize : Env.defaultCalculate,
		pageHtml : '<dl class="danqiu" id="wxzxsl"><dd><h5>二重号</h5>'
			+ '<ul class="sz-qiu"><li  id="wxzxsl_d_0">0</li><li id="wxzxsl_d_1">1</li><li id="wxzxsl_d_2">2</li>'
			+'<li id="wxzxsl_d_3">3</li><li id="wxzxsl_d_4">4</li><li id="wxzxsl_d_5">5</li><li id="wxzxsl_d_6">6</li>'
			+'<li id="wxzxsl_d_7">7</li><li id="wxzxsl_d_8">8</li><li id="wxzxsl_d_9">9</li></ul>'
			+ '<ul class="gongn"><li datascope="wxzxsl_d_ful_0-9">全</li><li datascope="wxzxsl_d_big_0-9">大</li><li datascope="wxzxsl_d_sma_0-9">小</li>'
			+'<li datascope="wxzxsl_d_sin_0-9">单</li><li datascope="wxzxsl_d_dou_0-9">双</li><li datascope="wxzxsl_d_cle_0-9">清</li></ul></dd>'
			+ '<dd><h5>单号</h5>'
			+ '<ul class="sz-qiu"><li  id="wxzxsl_t_0">0</li><li id="wxzxsl_t_1">1</li><li id="wxzxsl_t_2">2</li>'
			+'<li id="wxzxsl_t_3">3</li><li id="wxzxsl_t_4">4</li><li id="wxzxsl_t_5">5</li><li id="wxzxsl_t_6">6</li>'
			+'<li id="wxzxsl_t_7">7</li><li id="wxzxsl_t_8">8</li><li id="wxzxsl_t_9">9</li></ul>'
			+ '<ul class="gongn"><li datascope="wxzxsl_t_ful_0-9">全</li><li datascope="wxzxsl_t_big_0-9">大</li><li datascope="wxzxsl_t_sma_0-9">小</li>'
			+'<li datascope="wxzxsl_t_sin_0-9">单</li><li datascope="wxzxsl_t_dou_0-9">双</li><li datascope="wxzxsl_t_cle_0-9">清</li></ul></dd></dl>',
		bettips : '从“二重号”中选择两个数字，从“单号”中选择一个数字组成一注。若所选号码与开奖号码相同，且所选二重号都出现两次，则中奖。',
		betexample : '投注方案：如投注二重号是3,4,单号是5，开奖号码是34435，即中奖。',
		bethelp : '玩法：从“二重号”中选择两个数字，从“单号”中选择一个数字组成一注。若所选号码与开奖号码相同，且所选二重号都出现两次，则中奖。',
		textarea : {},
		formatBalls : function(balls) {
			return formatBall(balls['d'])+','+formatBall(balls['t']);
		},
		vali : function(e) {
			if (!way.get(this.rulecode + ".count.d")
					|| !way.get(this.rulecode + ".count.t")) {
				way.set("Lottery.itemcount", "0");
				way.set("Lottery.total", "0");
			} else if (way.get("Lottery.times")) {
				var d_balls = way.get(this.rulecode + ".balls.d");
				var t_balls = way.get(this.rulecode + ".balls.t");
				var d_count = way.get(this.rulecode + ".count.d");
				var t_count = way.get(this.rulecode + ".count.t");

				var itemcount = 0;
				
				if(d_count > 1 && t_count > 0 ) {
					for(var i = 0; i < t_balls.length; i++) {
						if(t_balls[i] != undefined && t_balls[i] != "") {
							if(d_balls[i] != undefined && d_balls[i] != "") {
								if(d_count > 2) {
									itemcount += (d_count-1)*(d_count-2)/2;
								}
							} else {
								itemcount += d_count*(d_count-1)/2;
							}
						}
					}
				}

				if (itemcount == 0) {
					itemcount = "0";
				} else {
					itemcount = parseInt(itemcount);
				}

				way.set("Lottery.itemcount", ""+itemcount);
				var total = itemcount * way.get("Lottery.times")
						* way.get("http://www.yugj881.com/resources/main/lottery/Lottery.yjf") * Env.price;
				if (total)
					
					way.set("Lottery.total", total.toFixed(4));
				else
					way.set("Lottery.total", "0");

			} else {
				way.set("Lottery.total", "0");
			}

		},
		clear : function() {
			var ss = [ "d", "t" ];
			for (var k = 0; k < 2; k++)
				for (var i = 0; i <= 9; i++) {
					var item = $("#wxzxsl_" + ss[k] + "_" + i);
					if (item.hasClass("cur")) {
						item.trigger('click');
					}
				}
		}
	},
	"wxzxel" : {
		showname : '组五',
		rulecode : 'wxzxel',
		realname : '[五星_组选20]',
		maxMultiplePerOrder : -1,
		maxPrize : -1,
		maxRecord : -1,
		fixed : 3,
		minMode : 1850,
		calculatePrize : Env.defaultCalculate,
		pageHtml : '<dl class="danqiu" id="wxzxel"><dd><h5>三重号</h5>'
			+ '<ul class="sz-qiu"><li  id="wxzxel_d_0">0</li><li id="wxzxel_d_1">1</li><li id="wxzxel_d_2">2</li>'
			+'<li id="wxzxel_d_3">3</li><li id="wxzxel_d_4">4</li><li id="wxzxel_d_5">5</li><li id="wxzxel_d_6">6</li>'
			+'<li id="wxzxel_d_7">7</li><li id="wxzxel_d_8">8</li><li id="wxzxel_d_9">9</li></ul>'
			+ '<ul class="gongn"><li datascope="wxzxel_d_ful_0-9">全</li><li datascope="wxzxel_d_big_0-9">大</li><li datascope="wxzxel_d_sma_0-9">小</li>'
			+'<li datascope="wxzxel_d_sin_0-9">单</li><li datascope="wxzxel_d_dou_0-9">双</li><li datascope="wxzxel_d_cle_0-9">清</li></ul></dd>'
			+ '<dd><h5>单号</h5>'
			+ '<ul class="sz-qiu"><li  id="wxzxel_t_0">0</li><li id="wxzxel_t_1">1</li><li id="wxzxel_t_2">2</li>'
			+'<li id="wxzxel_t_3">3</li><li id="wxzxel_t_4">4</li><li id="wxzxel_t_5">5</li><li id="wxzxel_t_6">6</li>'
			+'<li id="wxzxel_t_7">7</li><li id="wxzxel_t_8">8</li><li id="wxzxel_t_9">9</li></ul>'
			+ '<ul class="gongn"><li datascope="wxzxel_t_ful_0-9">全</li><li datascope="wxzxel_t_big_0-9">大</li><li datascope="wxzxel_t_sma_0-9">小</li>'
			+'<li datascope="wxzxel_t_sin_0-9">单</li><li datascope="wxzxel_t_dou_0-9">双</li><li datascope="wxzxel_t_cle_0-9">清</li></ul></dd></dl>',
		bettips : '从“三重号”中选择一个，从“单号”中选择两个组成一注。',
		betexample : '投注方案：如投注三重号是3,单号是45，开奖号码是33345，即中奖。',
		bethelp : '玩法：从“三重号”中选择一个，从“单号”中选择两个组成一注。',
		textarea : {},
		formatBalls : function(balls) {
			return formatBall(balls['d'])+','+formatBall(balls['t']);
		},
		vali : function(e) {

			if (!way.get(this.rulecode + ".count.d")
					|| !way.get(this.rulecode + ".count.t")) {
				way.set("Lottery.itemcount", "0");
				way.set("Lottery.total", "0");
			} else if (way.get("Lottery.times")) {
				var d_balls = way.get(this.rulecode + ".balls.d");
				var t_balls = way.get(this.rulecode + ".balls.t");
				var d_count = way.get(this.rulecode + ".count.d");
				var t_count = way.get(this.rulecode + ".count.t");

				var itemcount = 0;
				
				if(d_count > 0 && t_count > 1) {
					for(var i = 0; i < d_balls.length; i++) {
						if(d_balls[i] != undefined && d_balls[i] != "") {
							if(t_balls[i] != undefined && t_balls[i] != "") {
								if(t_count > 2) {
									itemcount += (t_count-1)*(t_count-2)/2;
								}
							} else {
								itemcount += t_count*(t_count-1)/2;
							}
						}
					}
				}

				if (itemcount == 0) {
					itemcount = "0";
				} else {
					itemcount = parseInt(itemcount);
				}

				way.set("Lottery.itemcount", ""+itemcount);
				var total = itemcount * way.get("Lottery.times")
						* way.get("http://www.yugj881.com/resources/main/lottery/Lottery.yjf") * Env.price;
				if (total)
					
					way.set("Lottery.total", total.toFixed(4));
				else
					way.set("Lottery.total", "0");

			} else {
				way.set("Lottery.total", "0");
			}

		},
		clear : function() {
			var ss = [ "d", "t" ];
			for (var k = 0; k < 2; k++)
				for (var i = 0; i <= 9; i++) {
					var item = $("#wxzxel_" + ss[k] + "_" + i);
					if (item.hasClass("cur")) {
						item.trigger('click');
					}
				}
		}
	},
	"wxzxyl" : {
		showname : '组五',
		rulecode : 'wxzxyl',
		realname : '[五星_组选10]',
		maxMultiplePerOrder : -1,
		maxPrize : -1,
		maxRecord : -1,
		fixed : 3,
		minMode : 1850,
		calculatePrize : Env.defaultCalculate,
		pageHtml : '<dl class="danqiu" id="wxzxyl"><dd><h5>三重号</h5>'
			+ '<ul class="sz-qiu"><li  id="wxzxyl_d_0">0</li><li id="wxzxyl_d_1">1</li><li id="wxzxyl_d_2">2</li>'
			+'<li id="wxzxyl_d_3">3</li><li id="wxzxyl_d_4">4</li><li id="wxzxyl_d_5">5</li><li id="wxzxyl_d_6">6</li>'
			+'<li id="wxzxyl_d_7">7</li><li id="wxzxyl_d_8">8</li><li id="wxzxyl_d_9">9</li></ul>'
			+ '<ul class="gongn"><li datascope="wxzxyl_d_ful_0-9">全</li><li datascope="wxzxyl_d_big_0-9">大</li><li datascope="wxzxyl_d_sma_0-9">小</li>'
			+'<li datascope="wxzxyl_d_sin_0-9">单</li><li datascope="wxzxyl_d_dou_0-9">双</li><li datascope="wxzxyl_d_cle_0-9">清</li></ul></dd>'
			+ '<dd><h5>二重号</h5>'
			+ '<ul class="sz-qiu"><li  id="wxzxyl_t_0">0</li><li id="wxzxyl_t_1">1</li><li id="wxzxyl_t_2">2</li>'
			+'<li id="wxzxyl_t_3">3</li><li id="wxzxyl_t_4">4</li><li id="wxzxyl_t_5">5</li><li id="wxzxyl_t_6">6</li>'
			+'<li id="wxzxyl_t_7">7</li><li id="wxzxyl_t_8">8</li><li id="wxzxyl_t_9">9</li></ul>'
			+ '<ul class="gongn"><li datascope="wxzxyl_t_ful_0-9">全</li><li datascope="wxzxyl_t_big_0-9">大</li><li datascope="wxzxyl_t_sma_0-9">小</li>'
			+'<li datascope="wxzxyl_t_sin_0-9">单</li><li datascope="wxzxyl_t_dou_0-9">双</li><li datascope="wxzxyl_t_cle_0-9">清</li></ul></dd></dl>',
		bettips : '从“三重号”中选择一个，从“二重号”中选择一个，组成一注。',
		betexample : '投注方案：如投注三重号是3,二重号是5，开奖号码是33355，即中奖。',
		bethelp : '玩法：从“三重号”中选择一个，从“二重号”中选择一个，组成一注。',
		textarea : {},
		formatBalls : function(balls) {
			return formatBall(balls['d'])+','+formatBall(balls['t']);
		},
		vali : function(e) {
			if (!way.get(this.rulecode + ".count.d")
					|| !way.get(this.rulecode + ".count.t")) {
				way.set("Lottery.itemcount", "0");
				way.set("Lottery.total", "0");
			} else if (way.get("Lottery.times")) {
				var d_balls = way.get(this.rulecode + ".balls.d");
				var t_balls = way.get(this.rulecode + ".balls.t");
				var d_count = way.get(this.rulecode + ".count.d");
				var t_count = way.get(this.rulecode + ".count.t");
				
				var itemcount = 0;
				
				if(d_count > 0 && t_count > 0) {
					for(var i = 0; i < d_balls.length; i++) {
						if(d_balls[i] != undefined && d_balls[i] != "") {
							if(t_balls[i] != undefined && t_balls[i] != "") {
								if(t_count > 1) {
									itemcount += t_count-1;
								}
							} else {
								itemcount += t_count;
							}
						}
					}
				}

				if (itemcount == 0) {
					itemcount = "0";
				} else {
					itemcount = parseInt(itemcount);
				}

				way.set("Lottery.itemcount", ""+itemcount);
				var total = itemcount * way.get("Lottery.times")
						* way.get("http://www.yugj881.com/resources/main/lottery/Lottery.yjf") * Env.price;
				if (total)
					
					way.set("Lottery.total", total.toFixed(4));
				else
					way.set("Lottery.total", "0");

			} else {
				way.set("Lottery.total", "0");
			}

		},
		clear : function() {
			var ss = [ "d", "t" ];
			for (var k = 0; k < 2; k++)
				for (var i = 0; i <= 9; i++) {
					var item = $("#wxzxyl_" + ss[k] + "_" + i);
					if (item.hasClass("cur")) {
						item.trigger('click');
					}
				}
		}
	},
	"wxzxw" : {
		showname : '组五',
		rulecode : 'wxzxw',
		realname : '[五星_组选5]',
		maxMultiplePerOrder : -1,
		maxPrize : -1,
		maxRecord : -1,
		fixed : 3,
		minMode : 1850,
		calculatePrize : Env.defaultCalculate,
		pageHtml : '<dl class="danqiu" id="wxzxw"><dd><h5>四重号</h5>'
			+ '<ul class="sz-qiu"><li  id="wxzxw_d_0">0</li><li id="wxzxw_d_1">1</li><li id="wxzxw_d_2">2</li>'
			+'<li id="wxzxw_d_3">3</li><li id="wxzxw_d_4">4</li><li id="wxzxw_d_5">5</li><li id="wxzxw_d_6">6</li>'
			+'<li id="wxzxw_d_7">7</li><li id="wxzxw_d_8">8</li><li id="wxzxw_d_9">9</li></ul>'
			+ '<ul class="gongn"><li datascope="wxzxw_d_ful_0-9">全</li><li datascope="wxzxw_d_big_0-9">大</li><li datascope="wxzxw_d_sma_0-9">小</li>'
			+'<li datascope="wxzxw_d_sin_0-9">单</li><li datascope="wxzxw_d_dou_0-9">双</li><li datascope="wxzxw_d_cle_0-9">清</li></ul></dd>'
			+ '<dd><h5>单号</h5>'
			+ '<ul class="sz-qiu"><li  id="wxzxw_t_0">0</li><li id="wxzxw_t_1">1</li><li id="wxzxw_t_2">2</li>'
			+'<li id="wxzxw_t_3">3</li><li id="wxzxw_t_4">4</li><li id="wxzxw_t_5">5</li><li id="wxzxw_t_6">6</li>'
			+'<li id="wxzxw_t_7">7</li><li id="wxzxw_t_8">8</li><li id="wxzxw_t_9">9</li></ul>'
			+ '<ul class="gongn"><li datascope="wxzxw_t_ful_0-9">全</li><li datascope="wxzxw_t_big_0-9">大</li><li datascope="wxzxw_t_sma_0-9">小</li>'
			+'<li datascope="wxzxw_t_sin_0-9">单</li><li datascope="wxzxw_t_dou_0-9">双</li><li datascope="wxzxw_t_cle_0-9">清</li></ul></dd></dl>',
		bettips : '从“四重号”中选择一个，从“单号"中选择一个，组成一注。',
		betexample : '投注方案：如投注四重号是3,单号是5，开奖号码是33335，即中奖。',
		bethelp : '玩法：从“四重号”中选择一个，从“单号"中选择一个，组成一注。',
		textarea : {},
		formatBalls : function(balls) {
			return formatBall(balls['d'])+','+formatBall(balls['t']);
		},
		vali : function(e) {
			if (!way.get(this.rulecode + ".count.d")
					|| !way.get(this.rulecode + ".count.t")) {
				way.set("Lottery.itemcount", "0");
				way.set("Lottery.total", "0");
			} else if (way.get("Lottery.times")) {
				var d_balls = way.get(this.rulecode + ".balls.d");
				var t_balls = way.get(this.rulecode + ".balls.t");
				var d_count = way.get(this.rulecode + ".count.d");
				var t_count = way.get(this.rulecode + ".count.t");
				
				var itemcount = 0;
				
				if(d_count > 0 && t_count > 0) {
					for(var i = 0; i < d_balls.length; i++) {
						if(d_balls[i] != undefined && d_balls[i] != "") {
							if(t_balls[i] != undefined && t_balls[i] != "") {
								if(t_count > 1) {
									itemcount += t_count-1;
								}
							} else {
								itemcount += t_count;
							}
						}
					}
				}

				if (itemcount == 0) {
					itemcount = "0";
				} else {
					itemcount = parseInt(itemcount);
				}

				way.set("Lottery.itemcount", ""+itemcount);
				var total = itemcount * way.get("Lottery.times")
						* way.get("http://www.yugj881.com/resources/main/lottery/Lottery.yjf") * Env.price;
				if (total)
					
					way.set("Lottery.total", total.toFixed(4));
				else
					way.set("Lottery.total", "0");

			} else {
				way.set("Lottery.total", "0");
			}

		},
		clear : function() {
			var ss = [ "d", "t" ];
			for (var k = 0; k < 2; k++)
				for (var i = 0; i <= 9; i++) {
					var item = $("#wxzxw_" + ss[k] + "_" + i);
					if (item.hasClass("cur")) {
						item.trigger('click');
					}
				}
		}
	},
	"sixzhixfsq" : {
		showname : '复式',
		rulecode : 'sixzhixfsq',
		realname : '[前四星_复式]',
		fixed : 0.1,
		maxMultiplePerOrder : -1,
		maxPrize : -1,
		
		maxRecord : 8500,
		minMode : 1850,
		calculatePrize : Env.defaultCalculate,
		pageHtml : '<dl class="danqiu" id="sixzhixfsq"><dd><h5>万位</h5>'
			+ '<ul class="sz-qiu"><li  id="sixzhixfsq_w_0">0</li><li id="sixzhixfsq_w_1">1</li><li id="sixzhixfsq_w_2">2</li>'
			+'<li id="sixzhixfsq_w_3">3</li><li id="sixzhixfsq_w_4">4</li><li id="sixzhixfsq_w_5">5</li><li id="sixzhixfsq_w_6">6</li>'
			+'<li id="sixzhixfsq_w_7">7</li><li id="sixzhixfsq_w_8">8</li><li id="sixzhixfsq_w_9">9</li></ul>'
			+ '<ul class="gongn"><li datascope="sixzhixfsq_w_ful_0-9">全</li><li datascope="sixzhixfsq_w_big_0-9">大</li><li datascope="sixzhixfsq_w_sma_0-9">小</li>'
			+'<li datascope="sixzhixfsq_w_sin_0-9">单</li><li datascope="sixzhixfsq_w_dou_0-9">双</li><li datascope="sixzhixfsq_w_cle_0-9">清</li></ul></dd>'
			+ '<dd><h5>千位</h5>'
			+ '<ul class="sz-qiu"><li  id="sixzhixfsq_q_0">0</li><li id="sixzhixfsq_q_1">1</li><li id="sixzhixfsq_q_2">2</li>'
			+'<li id="sixzhixfsq_q_3">3</li><li id="sixzhixfsq_q_4">4</li><li id="sixzhixfsq_q_5">5</li><li id="sixzhixfsq_q_6">6</li>'
			+'<li id="sixzhixfsq_q_7">7</li><li id="sixzhixfsq_q_8">8</li><li id="sixzhixfsq_q_9">9</li></ul>'
			+ '<ul class="gongn"><li datascope="sixzhixfsq_q_ful_0-9">全</li><li datascope="sixzhixfsq_q_big_0-9">大</li><li datascope="sixzhixfsq_q_sma_0-9">小</li>'
			+'<li datascope="sixzhixfsq_q_sin_0-9">单</li><li datascope="sixzhixfsq_q_dou_0-9">双</li><li datascope="sixzhixfsq_q_cle_0-9">清</li></ul></dd>'
			+ '<dd><h5>百位</h5>'
			+ '<ul class="sz-qiu"><li  id="sixzhixfsq_b_0">0</li><li id="sixzhixfsq_b_1">1</li><li id="sixzhixfsq_b_2">2</li>'
			+'<li id="sixzhixfsq_b_3">3</li><li id="sixzhixfsq_b_4">4</li><li id="sixzhixfsq_b_5">5</li><li id="sixzhixfsq_b_6">6</li>'
			+'<li id="sixzhixfsq_b_7">7</li><li id="sixzhixfsq_b_8">8</li><li id="sixzhixfsq_b_9">9</li></ul>'
			+ '<ul class="gongn"><li datascope="sixzhixfsq_b_ful_0-9">全</li><li datascope="sixzhixfsq_b_big_0-9">大</li><li datascope="sixzhixfsq_b_sma_0-9">小</li>'
			+'<li datascope="sixzhixfsq_b_sin_0-9">单</li><li datascope="sixzhixfsq_b_dou_0-9">双</li><li datascope="sixzhixfsq_b_cle_0-9">清</li></ul></dd>'
			+ '<dd><h5>十位</h5>'
			+ '<ul class="sz-qiu"><li  id="sixzhixfsq_s_0">0</li><li id="sixzhixfsq_s_1">1</li><li id="sixzhixfsq_s_2">2</li>'
			+'<li id="sixzhixfsq_s_3">3</li><li id="sixzhixfsq_s_4">4</li><li id="sixzhixfsq_s_5">5</li><li id="sixzhixfsq_s_6">6</li>'
			+'<li id="sixzhixfsq_s_7">7</li><li id="sixzhixfsq_s_8">8</li><li id="sixzhixfsq_s_9">9</li></ul>'
			+ '<ul class="gongn"><li datascope="sixzhixfsq_s_ful_0-9">全</li><li datascope="sixzhixfsq_s_big_0-9">大</li><li datascope="sixzhixfsq_s_sma_0-9">小</li>'
			+'<li datascope="sixzhixfsq_s_sin_0-9">单</li><li datascope="sixzhixfsq_s_dou_0-9">双</li><li datascope="sixzhixfsq_s_cle_0-9">清</li></ul></dd></dl>',
		bettips : '从万、千、百、十位各选一个号码组成一注。',
		betexample : '投注方案：2345*；开奖号码：2345*',
		bethelp : '玩法：从万位、千位、百位、十位中选择一个4位数号码组成一注，所选号码与开奖号码全部相同，且顺序一致，即为中奖。',
		formatBalls : function(balls) {
			return formatBall(balls['w'])+','+formatBall(balls['q'])+','+
				formatBall(balls['b'])+','+formatBall(balls['s']);
		},
		vali : function() {
			if (!way.get(this.rulecode + ".count.w")
					|| !way.get(this.rulecode + ".count.q")
					|| !way.get(this.rulecode + ".count.b")
					|| !way.get(this.rulecode + ".count.s")) {
				way.set("Lottery.itemcount", "0");
				way.set("Lottery.total", "0");
			} else if (way.get("Lottery.times")) {
				var itemcount = way.get(this.rulecode + ".count.w")
						* way.get(this.rulecode + ".count.q")
						* way.get(this.rulecode + ".count.b")
						* way.get(this.rulecode + ".count.s");
				way.set("Lottery.itemcount", ""+itemcount);
				var total = itemcount * way.get("Lottery.times")
						* way.get("http://www.yugj881.com/resources/main/lottery/Lottery.yjf") * Env.price;
				if (total)
					way.set("Lottery.total", total.toFixed(4));
				else
					way.set("Lottery.total", "0");
			} else {
				way.set("Lottery.total", "0");
			}
		},
		clear : function() {
			var ss = [ "w", "q", "b", "s" ];
			for (k = 0; k < 4; k++)
				for (i = 0; i <= 9; i++) {
					var item = $("#sixzhixfsq_" + ss[k] + "_" + i);
					if (item.hasClass("cur")) {
						item.trigger('click');
					}
				}
		}
	},
	"sixzhixdsq" : {
		showname : '单式',
		rulecode : 'sixzhixdsq',
		realname : '[前四星_单式]',
		fixed : 0.1,
		maxMultiplePerOrder : -1,
		maxPrize : -1,
		maxRecord : 8500,
		
		minMode : 1850,
		calculatePrize : Env.defaultCalculate,
		bettips : '手动输入号码，至少输入1个四位数号码组成一注。',
		betexample : '投注方案：2345*； 开奖号码：2345*，即中前四星直选一等奖',
		bethelp : '玩法：手动输入一个4位数号码组成一注，所选号码的万位、千位、百位、十位与开奖号码相同，且顺序一致，即为中奖。',
		textarea : {},
		vali : function(k) {
			var itemcount = 0;
			if (way.get("Lottery.context")) {
				var v = way.get("Lottery.context");
				var reg = /\b[0-9]{4}\b/g;
				// 去重复
				var sszz = util_unique(v, reg);
				sszz = sszz.sort();
				if (sszz) {
					itemcount = sszz.length;
					way.set("Lottery.contexts", sszz);
				}
			}
			if (way.get("Lottery.times")) {
				if (itemcount)
					way.set("Lottery.itemcount", ""+itemcount);
				else
					way.set("Lottery.itemcount", "0");
				var total = itemcount * way.get("Lottery.times")
						* way.get("http://www.yugj881.com/resources/main/lottery/Lottery.yjf") * Env.price;
				if (total)
					way.set("Lottery.total", total.toFixed(4));
				else
					way.set("Lottery.total", "0");
			} else {
				way.set("Lottery.itemcount", "0");
				way.set("Lottery.total", "0");
			}
		},
		changeContext : function(e) {
			var k = String.fromCharCode(e.which);
			if (isNaN(parseInt(k))) {
				if (k != ' ' && k != ',' && k != ';')
					e.returnValue = false;
			}
		},
		clear : function() {
			way.set("Lottery.context", "");
		}
	},
	"sixzhixfsh" : {
		showname : '复式',
		rulecode : 'sixzhixfsh',
		realname : '[后四星_复式]',
		maxMultiplePerOrder : -1,
		maxPrize : -1,
		maxRecord : 8500,
		
		fixed : 0.1,
		minMode : 1850,
		calculatePrize : Env.defaultCalculate,
		pageHtml :'<dl class="danqiu" id="sixzhixfsh"><dd><h5>千位</h5>'
			+ '<ul class="sz-qiu"><li  id="sixzhixfsh_q_0">0</li><li id="sixzhixfsh_q_1">1</li><li id="sixzhixfsh_q_2">2</li>'
			+'<li id="sixzhixfsh_q_3">3</li><li id="sixzhixfsh_q_4">4</li><li id="sixzhixfsh_q_5">5</li><li id="sixzhixfsh_q_6">6</li>'
			+'<li id="sixzhixfsh_q_7">7</li><li id="sixzhixfsh_q_8">8</li><li id="sixzhixfsh_q_9">9</li></ul>'
			+ '<ul class="gongn"><li datascope="sixzhixfsh_q_ful_0-9">全</li><li datascope="sixzhixfsh_q_big_0-9">大</li><li datascope="sixzhixfsh_q_sma_0-9">小</li>'
			+'<li datascope="sixzhixfsh_q_sin_0-9">单</li><li datascope="sixzhixfsh_q_dou_0-9">双</li><li datascope="sixzhixfsh_q_cle_0-9">清</li></ul></dd>'
			+ '<dd><h5>百位</h5>'
			+ '<ul class="sz-qiu"><li  id="sixzhixfsh_b_0">0</li><li id="sixzhixfsh_b_1">1</li><li id="sixzhixfsh_b_2">2</li>'
			+'<li id="sixzhixfsh_b_3">3</li><li id="sixzhixfsh_b_4">4</li><li id="sixzhixfsh_b_5">5</li><li id="sixzhixfsh_b_6">6</li>'
			+'<li id="sixzhixfsh_b_7">7</li><li id="sixzhixfsh_b_8">8</li><li id="sixzhixfsh_b_9">9</li></ul>'
			+ '<ul class="gongn"><li datascope="sixzhixfsh_b_ful_0-9">全</li><li datascope="sixzhixfsh_b_big_0-9">大</li><li datascope="sixzhixfsh_b_sma_0-9">小</li>'
			+'<li datascope="sixzhixfsh_b_sin_0-9">单</li><li datascope="sixzhixfsh_b_dou_0-9">双</li><li datascope="sixzhixfsh_b_cle_0-9">清</li></ul></dd>'
			+ '<dd><h5>十位</h5>'
			+ '<ul class="sz-qiu"><li  id="sixzhixfsh_s_0">0</li><li id="sixzhixfsh_s_1">1</li><li id="sixzhixfsh_s_2">2</li>'
			+'<li id="sixzhixfsh_s_3">3</li><li id="sixzhixfsh_s_4">4</li><li id="sixzhixfsh_s_5">5</li><li id="sixzhixfsh_s_6">6</li>'
			+'<li id="sixzhixfsh_s_7">7</li><li id="sixzhixfsh_s_8">8</li><li id="sixzhixfsh_s_9">9</li></ul>'
			+ '<ul class="gongn"><li datascope="sixzhixfsh_s_ful_0-9">全</li><li datascope="sixzhixfsh_s_big_0-9">大</li><li datascope="sixzhixfsh_s_sma_0-9">小</li>'
			+'<li datascope="sixzhixfsh_s_sin_0-9">单</li><li datascope="sixzhixfsh_s_dou_0-9">双</li><li datascope="sixzhixfsh_s_cle_0-9">清</li></ul></dd>'
			+ '<dd><h5>个位</h5>'
			+ '<ul class="sz-qiu"><li  id="sixzhixfsh_g_0">0</li><li id="sixzhixfsh_g_1">1</li><li id="sixzhixfsh_g_2">2</li>'
			+'<li id="sixzhixfsh_g_3">3</li><li id="sixzhixfsh_g_4">4</li><li id="sixzhixfsh_g_5">5</li><li id="sixzhixfsh_g_6">6</li>'
			+'<li id="sixzhixfsh_g_7">7</li><li id="sixzhixfsh_g_8">8</li><li id="sixzhixfsh_g_9">9</li></ul>'
			+ '<ul class="gongn"><li datascope="sixzhixfsh_g_ful_0-9">全</li><li datascope="sixzhixfsh_g_big_0-9">大</li><li datascope="sixzhixfsh_g_sma_0-9">小</li>'
			+'<li datascope="sixzhixfsh_g_sin_0-9">单</li><li datascope="sixzhixfsh_g_dou_0-9">双</li><li datascope="sixzhixfsh_g_cle_0-9">清</li></ul></dd></dl>',
	bettips : '从千、百、十、个位各选一个号码组成一注。',
		betexample : '投注方案：*3456；开奖号码：*3456',
		bethelp : '玩法：从千位、百位、十位、个位中选择一个4位数号码组成一注，所选号码与开奖号码全部相同，且顺序一致，即为中奖。',
		formatBalls : function(balls) {
			return formatBall(balls['q'])+','+formatBall(balls['b'])+','+formatBall(balls['s'])+','+formatBall(balls['g']);
		},
		vali : function() {
			if (!way.get(this.rulecode + ".count.q")
					|| !way.get(this.rulecode + ".count.b")
					|| !way.get(this.rulecode + ".count.s")
					|| !way.get(this.rulecode + ".count.g")) {
				way.set("Lottery.itemcount", "0");
				way.set("Lottery.total", "0");
			} else if (way.get("Lottery.times")) {
				var itemcount = way.get(this.rulecode + ".count.q")
						* way.get(this.rulecode + ".count.b")
						* way.get(this.rulecode + ".count.s")
						* way.get(this.rulecode + ".count.g");
				way.set("Lottery.itemcount", ""+itemcount);
				var total = itemcount * way.get("Lottery.times")
						* way.get("http://www.yugj881.com/resources/main/lottery/Lottery.yjf") * Env.price;
				if (total)
					way.set("Lottery.total", total.toFixed(4));
				else
					way.set("Lottery.total", "0");
			} else {
				way.set("Lottery.total", "0");
			}
		},
		clear : function() {
			var ss = [ "q", "b", "s", "g" ];
			for (k = 0; k < 4; k++)
				for (i = 0; i <= 9; i++) {
					var item = $("#sixzhixfsh_" + ss[k] + "_" + i);
					if (item.hasClass("cur")) {
						item.trigger('click');
					}
				}
		}
	},
	"sixzhixdsh" : {
		showname : '单式',
		rulecode : 'sixzhixdsh',
		realname : '[后四星_单式]',
		maxMultiplePerOrder : -1,
		maxPrize : -1,
		maxRecord : 8500,
		
		fixed : 0.1,
		minMode : 1850,
		calculatePrize : Env.defaultCalculate,
		bettips : '手动输入号码，至少输入1个四位数号码组成一注。',
		betexample : '投注方案：*3456； 开奖号码：*3456，即中后四星直选一等奖',
		bethelp : '玩法：手动输入一个4位数号码组成一注，所选号码的千位、百位、十位、个位与开奖号码相同，且顺序一致，即为中奖。',
		textarea : {},
		vali : function(k) {
			var itemcount = 0;
			if (way.get("Lottery.context")) {
				var v = way.get("Lottery.context");
				var reg = /\b[0-9]{4}\b/g;
				// 去重复
				var sszz = util_unique(v, reg);
				sszz = sszz.sort();
				if (sszz) {
					itemcount = sszz.length;
					way.set("Lottery.contexts", sszz);
				}
			}
			if (way.get("Lottery.times")) {
				if (itemcount)
					way.set("Lottery.itemcount", ""+itemcount);
				else
					way.set("Lottery.itemcount", "0");
				var total = itemcount * way.get("Lottery.times")
						* way.get("http://www.yugj881.com/resources/main/lottery/Lottery.yjf") * Env.price;
				if (total)
					way.set("Lottery.total", total.toFixed(4));
				else
					way.set("Lottery.total", "0");
			} else {
				way.set("Lottery.itemcount", "0");
				way.set("Lottery.total", "0");
			}
		},
		changeContext : function(e) {
			var k = String.fromCharCode(e.which);
			if (isNaN(parseInt(k))) {
				if (k != ' ' && k != ',' && k != ';')
					e.returnValue = false;
			}
		},
		clear : function() {
			way.set("Lottery.context", "");
		}
	},
	"sixzhixzhq" : {
		showname : '组合',
		rulecode : 'sixzhixzhq',
		realname : '[前四组合]',
		maxMultiplePerOrder : -1,
		maxPrize : -1,
		maxRecord : 8500,
		fixed : 0.1,
		minMode : 1850,
		calculatePrize : Env.defaultCalculate,
		pageHtml :'<dl class="danqiu" id="sixzhixzhq"><dd><h5>万位</h5>'
			+ '<ul class="sz-qiu"><li  id="sixzhixzhq_w_0">0</li><li id="sixzhixzhq_w_1">1</li><li id="sixzhixzhq_w_2">2</li>'
			+'<li id="sixzhixzhq_w_3">3</li><li id="sixzhixzhq_w_4">4</li><li id="sixzhixzhq_w_5">5</li><li id="sixzhixzhq_w_6">6</li>'
			+'<li id="sixzhixzhq_w_7">7</li><li id="sixzhixzhq_w_8">8</li><li id="sixzhixzhq_w_9">9</li></ul>'
			+ '<ul class="gongn"><li datascope="sixzhixzhq_w_ful_0-9">全</li><li datascope="sixzhixzhq_w_big_0-9">大</li><li datascope="sixzhixzhq_w_sma_0-9">小</li>'
			+'<li datascope="sixzhixzhq_w_sin_0-9">单</li><li datascope="sixzhixzhq_w_dou_0-9">双</li><li datascope="sixzhixzhq_w_cle_0-9">清</li></ul></dd>'
			+'<dd><h5>千位</h5>'
			+ '<ul class="sz-qiu"><li  id="sixzhixzhq_q_0">0</li><li id="sixzhixzhq_q_1">1</li><li id="sixzhixzhq_q_2">2</li>'
			+'<li id="sixzhixzhq_q_3">3</li><li id="sixzhixzhq_q_4">4</li><li id="sixzhixzhq_q_5">5</li><li id="sixzhixzhq_q_6">6</li>'
			+'<li id="sixzhixzhq_q_7">7</li><li id="sixzhixzhq_q_8">8</li><li id="sixzhixzhq_q_9">9</li></ul>'
			+ '<ul class="gongn"><li datascope="sixzhixzhq_q_ful_0-9">全</li><li datascope="sixzhixzhq_q_big_0-9">大</li><li datascope="sixzhixzhq_q_sma_0-9">小</li>'
			+'<li datascope="sixzhixzhq_q_sin_0-9">单</li><li datascope="sixzhixzhq_q_dou_0-9">双</li><li datascope="sixzhixzhq_q_cle_0-9">清</li></ul></dd>'
			+ '<dd><h5>百位</h5>'
			+ '<ul class="sz-qiu"><li  id="sixzhixzhq_b_0">0</li><li id="sixzhixzhq_b_1">1</li><li id="sixzhixzhq_b_2">2</li>'
			+'<li id="sixzhixzhq_b_3">3</li><li id="sixzhixzhq_b_4">4</li><li id="sixzhixzhq_b_5">5</li><li id="sixzhixzhq_b_6">6</li>'
			+'<li id="sixzhixzhq_b_7">7</li><li id="sixzhixzhq_b_8">8</li><li id="sixzhixzhq_b_9">9</li></ul>'
			+ '<ul class="gongn"><li datascope="sixzhixzhq_b_ful_0-9">全</li><li datascope="sixzhixzhq_b_big_0-9">大</li><li datascope="sixzhixzhq_b_sma_0-9">小</li>'
			+'<li datascope="sixzhixzhq_b_sin_0-9">单</li><li datascope="sixzhixzhq_b_dou_0-9">双</li><li datascope="sixzhixzhq_b_cle_0-9">清</li></ul></dd>'
			+ '<dd><h5>十位</h5>'
			+ '<ul class="sz-qiu"><li  id="sixzhixzhq_s_0">0</li><li id="sixzhixzhq_s_1">1</li><li id="sixzhixzhq_s_2">2</li>'
			+'<li id="sixzhixzhq_s_3">3</li><li id="sixzhixzhq_s_4">4</li><li id="sixzhixzhq_s_5">5</li><li id="sixzhixzhq_s_6">6</li>'
			+'<li id="sixzhixzhq_s_7">7</li><li id="sixzhixzhq_s_8">8</li><li id="sixzhixzhq_s_9">9</li></ul>'
			+ '<ul class="gongn"><li datascope="sixzhixzhq_s_ful_0-9">全</li><li datascope="sixzhixzhq_s_big_0-9">大</li><li datascope="sixzhixzhq_s_sma_0-9">小</li>'
			+'<li datascope="sixzhixzhq_s_sin_0-9">单</li><li datascope="sixzhixzhq_s_dou_0-9">双</li><li datascope="sixzhixzhq_s_cle_0-9">清</li></ul></dd></dl>',
		bettips : '从万、千、百、十位各选一个号码。',
		betexample : '投注方案：1234*；开奖号码：1234*',
		bethelp : '玩法：从万位、千位、百位、十位中选择一个4位数号码组成4注。如下单1234，是4注，分拆为四星1234，三星234，二星34，一星4，所选号码与开奖号码全部相同，且顺序一致，即为中奖。',
		formatBalls : function(balls) {
			return formatBall(balls['w'])+','+formatBall(balls['q'])+','+
				formatBall(balls['b'])+','+formatBall(balls['s']);
		},
		vali : function() {
			if (!way.get(this.rulecode + ".count.w")
					|| !way.get(this.rulecode + ".count.q")
					|| !way.get(this.rulecode + ".count.b")
					|| !way.get(this.rulecode + ".count.s")) {
				way.set("Lottery.itemcount", "0");
				way.set("Lottery.total", "0");
			} else if (way.get("Lottery.times")) {
				var w = way.get(this.rulecode + ".count.w");
				var q = way.get(this.rulecode + ".count.q");
				var b = way.get(this.rulecode + ".count.b");
				var s = way.get(this.rulecode + ".count.s");
				
				// var itemcount = w*q*b*s + w*b*s + w*s + s;
				var itemcount = w*q*b*s*4;
				way.set("Lottery.itemcount", ""+itemcount);
				var total = itemcount * way.get("Lottery.times")
						* way.get("http://www.yugj881.com/resources/main/lottery/Lottery.yjf") * Env.price;
				if (total)
					way.set("Lottery.total", total.toFixed(4));
				else
					way.set("Lottery.total", "0");
			} else {
				way.set("Lottery.total", "0");
			}
		},
		clear : function() {
			var ss = [ "w", "q", "b", "s" ];
			for (k = 0; k < 4; k++)
				for (i = 0; i <= 9; i++) {
					var item = $("#sixzhixzhq_" + ss[k] + "_" + i);
					if (item.hasClass("cur")) {
						item.trigger('click');
					}
				}
		}
	},
	"qsizxes" : {
		showname : '组选',
		rulecode : 'qsizxes',
		realname : '[前四星_组选24]',
		maxMultiplePerOrder : -1,
		maxPrize : -1,
		maxRecord : -1,
		fixed : 0.1,
		minMode : 1850,
		calculatePrize : Env.defaultCalculate,
		pageHtml :'<dl class="danqiu" id="qsizxes"><dd><h5>组选24</h5>'
			+ '<ul class="sz-qiu"><li  id="qsizxes_zu_0">0</li><li id="qsizxes_zu_1">1</li><li id="qsizxes_zu_2">2</li>'
			+'<li id="qsizxes_zu_3">3</li><li id="qsizxes_zu_4">4</li><li id="qsizxes_zu_5">5</li><li id="qsizxes_zu_6">6</li>'
			+'<li id="qsizxes_zu_7">7</li><li id="qsizxes_zu_8">8</li><li id="qsizxes_zu_9">9</li></ul>'
			+ '<ul class="gongn"><li datascope="qsizxes_zu_ful_0-9">全</li><li datascope="qsizxes_zu_big_0-9">大</li><li datascope="qsizxes_zu_sma_0-9">小</li>'
			+'<li datascope="qsizxes_zu_sin_0-9">单</li><li datascope="qsizxes_zu_dou_0-9">双</li><li datascope="qsizxes_zu_cle_0-9">清</li></ul></dd></dl>',
		bettips : '至少选择四个号码组成一注。',
		betexample : '投注方案：选择1234（展开为1234*，1243*，1324*，1342*，1423*，1432*...）,开奖为4321*，即为中奖',
		bethelp : '玩法：前四组选24：选4个或多个，所选号码与开奖万、千、百、十一致顺序不限，即中奖',
		vali : function() {
			if (!way.get(this.rulecode + ".count.zu")
					|| way.get(this.rulecode + ".count.zu") < 4) {
				way.set("Lottery.itemcount", "0");
				way.set("Lottery.total", "0");
			} else if (way.get("Lottery.times")) {
				var itemcount = way.get(this.rulecode + ".count.zu");
				itemcount = itemcount * (itemcount - 1) * (itemcount - 2) * (itemcount - 3) / 24;
				way.set("Lottery.itemcount", ""+itemcount);
				var total = itemcount * way.get("Lottery.times")
						* way.get("http://www.yugj881.com/resources/main/lottery/Lottery.yjf") * Env.price;
				if (total)
					way.set("Lottery.total", total.toFixed(4));
				else
					way.set("Lottery.total", "0");
			} else {
				way.set("Lottery.total", "0");
			}
		},
		clear : function() {
			var ss = [ "zu" ];
			for (k = 0; k < 1; k++)
				for (i = 0; i <= 9; i++) {
					var item = $("#qsizxes_" + ss[k] + "_" + i);
					if (item.hasClass("cur")) {
						item.trigger('click');
					}
				}
		}
	},
	"qsizxye" : {
		showname : '组选',
		rulecode : 'qsizxye',
		realname : '[前四星_组选12]',
		maxMultiplePerOrder : -1,
		maxPrize : -1,
		maxRecord : -1,
		fixed : 0.1,
		minMode : 1850,
		calculatePrize : Env.defaultCalculate,
		pageHtml :'<dl class="danqiu" id="qsizxye"><dd><h5>二重号</h5>'
			+ '<ul class="sz-qiu"><li  id="qsizxye_d_0">0</li><li id="qsizxye_d_1">1</li><li id="qsizxye_d_2">2</li>'
			+'<li id="qsizxye_d_3">3</li><li id="qsizxye_d_4">4</li><li id="qsizxye_d_5">5</li><li id="qsizxye_d_6">6</li>'
			+'<li id="qsizxye_d_7">7</li><li id="qsizxye_d_8">8</li><li id="qsizxye_d_9">9</li></ul>'
			+ '<ul class="gongn"><li datascope="qsizxye_d_ful_0-9">全</li><li datascope="qsizxye_d_big_0-9">大</li><li datascope="qsizxye_d_sma_0-9">小</li>'
			+'<li datascope="qsizxye_d_sin_0-9">单</li><li datascope="qsizxye_d_dou_0-9">双</li><li datascope="qsizxye_d_cle_0-9">清</li></ul></dd>'
			+ '<dd><h5>单号</h5>'
			+ '<ul class="sz-qiu"><li  id="qsizxye_t_0">0</li><li id="qsizxye_t_1">1</li><li id="qsizxye_t_2">2</li>'
			+'<li id="qsizxye_t_3">3</li><li id="qsizxye_t_4">4</li><li id="qsizxye_t_5">5</li><li id="qsizxye_t_6">6</li>'
			+'<li id="qsizxye_t_7">7</li><li id="qsizxye_t_8">8</li><li id="qsizxye_t_9">9</li></ul>'
			+ '<ul class="gongn"><li datascope="qsizxye_t_ful_0-9">全</li><li datascope="qsizxye_t_big_0-9">大</li><li datascope="qsizxye_t_sma_0-9">小</li>'
			+'<li datascope="qsizxye_t_sin_0-9">单</li><li datascope="qsizxye_t_dou_0-9">双</li><li datascope="qsizxye_t_cle_0-9">清</li></ul></dd></dl>',
		bettips : '从二重号中选择一个，从单号中选择两个组成一注。',
		betexample : '投注方案：如投注的二重号是1，单号是23，开奖为1123*，即为中奖',
		bethelp : '玩法：从二重号中选择一个或多个，从单号中选择两个或多个，所选号码与开奖万、千、百、十一致顺序不限，即中奖',
		formatBalls : function(balls) {
			return formatBall(balls['d'])+','+formatBall(balls['t']);
		},
		vali : function() {
			if (!way.get(this.rulecode + ".count.d")
					|| !way.get(this.rulecode + ".count.t")) {
				way.set("Lottery.itemcount", "0");
				way.set("Lottery.total", "0");
			} else if (way.get("Lottery.times")) {
				var d_balls = way.get(this.rulecode + ".balls.d");
				var t_balls = way.get(this.rulecode + ".balls.t");
				var d_count = way.get(this.rulecode + ".count.d");
				var t_count = way.get(this.rulecode + ".count.t");

				var itemcount = 0;
				
				if(d_count > 0 && t_count > 1) {
					for(var i = 0; i < d_balls.length; i++) {
						if(d_balls[i] != undefined && d_balls[i] != "") {
							if(t_balls[i] != undefined && t_balls[i] != "") {
								if(t_count > 2) {
									itemcount += (t_count-1)*(t_count-2)/2;
								}
							} else {
								itemcount += t_count*(t_count-1)/2;
							}
						}
					}
				}
				
				if (itemcount == 0) {
					itemcount = "0";
				} else {
					itemcount = parseInt(itemcount);
				}
				way.set("Lottery.itemcount", ""+itemcount);
				var total = itemcount * way.get("Lottery.times") * way.get("http://www.yugj881.com/resources/main/lottery/Lottery.yjf") * Env.price;
				if (total)
					way.set("Lottery.total", total.toFixed(4));
				else
					way.set("Lottery.total", "0");

			} else {
				way.set("Lottery.total", "0");
			}
		},
		clear : function() {
			var ss = [ "d", "t" ];
			for (k = 0; k < 2; k++)
				for (i = 0; i <= 9; i++) {
					var item = $("#qsizxye_" + ss[k] + "_" + i);
					if (item.hasClass("cur")) {
						item.trigger('click');
					}
				}
		}
	},
	"qsizxl" : {
		showname : '组选',
		rulecode : 'qsizxl',
		realname : '[前四星_组选6]',
		maxMultiplePerOrder : -1,
		maxPrize : -1,
		maxRecord : -1,
		fixed : 0.1,
		minMode : 1850,
		calculatePrize : Env.defaultCalculate,
		pageHtml :'<dl class="danqiu" id="qsizxl"><dd><h5>组选6</h5>'
			+ '<ul class="sz-qiu"><li  id="qsizxl_zu_0">0</li><li id="qsizxl_zu_1">1</li><li id="qsizxl_zu_2">2</li>'
			+'<li id="qsizxl_zu_3">3</li><li id="qsizxl_zu_4">4</li><li id="qsizxl_zu_5">5</li><li id="qsizxl_zu_6">6</li>'
			+'<li id="qsizxl_zu_7">7</li><li id="qsizxl_zu_8">8</li><li id="qsizxl_zu_9">9</li></ul>'
			+ '<ul class="gongn"><li datascope="qsizxl_zu_ful_0-9">全</li><li datascope="qsizxl_zu_big_0-9">大</li><li datascope="qsizxl_zu_sma_0-9">小</li>'
			+'<li datascope="qsizxl_zu_sin_0-9">单</li><li datascope="qsizxl_zu_dou_0-9">双</li><li datascope="qsizxl_zu_cle_0-9">清</li></ul></dd></dl>',
		bettips : '至少选择二个号码组成一注。',
		betexample : '投注方案：选择12（展开为1122*，1212*，1221*，2112*，2121*，2211*...）,开奖为1122*，即为中奖',
		bethelp : '玩法：前四组选6：选2个或多个，所选号码与开奖万、千、百、十一致顺序不限，即中奖',
		vali : function() {
			if (!way.get(this.rulecode + ".count.zu")
					|| way.get(this.rulecode + ".count.zu") < 2) {
				way.set("Lottery.itemcount", "0");
				way.set("Lottery.total", "0");
			} else if (way.get("Lottery.times")) {
				var itemcount = way.get(this.rulecode + ".count.zu");
				itemcount = itemcount * (itemcount -1)/ 2;
				way.set("Lottery.itemcount", ""+itemcount);
				var total = itemcount * way.get("Lottery.times")
						* way.get("http://www.yugj881.com/resources/main/lottery/Lottery.yjf") * Env.price;
				if (total)
					way.set("Lottery.total", total.toFixed(4));
				else
					way.set("Lottery.total", "0");
			} else {
				way.set("Lottery.total", "0");
			}
		},
		clear : function() {
			var ss = [ "zu" ];
			for (k = 0; k < 1; k++)
				for (i = 0; i <= 9; i++) {
					var item = $("#qsizxl_" + ss[k] + "_" + i);
					if (item.hasClass("cur")) {
						item.trigger('click');
					}
				}
		}
	},
	"qsizxs" : {
		showname : '组选',
		rulecode : 'qsizxs',
		realname : '[前四星_组选4]',
		maxMultiplePerOrder : -1,
		maxPrize : -1,
		maxRecord : -1,
		fixed : 0.1,
		minMode : 1850,
		calculatePrize : Env.defaultCalculate,
		pageHtml :'<dl class="danqiu" id="qsizxs"><dd><h5>三重号</h5>'
			+ '<ul class="sz-qiu"><li  id="qsizxs_d_0">0</li><li id="qsizxs_d_1">1</li><li id="qsizxs_d_2">2</li>'
			+'<li id="qsizxs_d_3">3</li><li id="qsizxs_d_4">4</li><li id="qsizxs_d_5">5</li><li id="qsizxs_d_6">6</li>'
			+'<li id="qsizxs_d_7">7</li><li id="qsizxs_d_8">8</li><li id="qsizxs_d_9">9</li></ul>'
			+ '<ul class="gongn"><li datascope="qsizxs_d_ful_0-9">全</li><li datascope="qsizxs_d_big_0-9">大</li><li datascope="qsizxs_d_sma_0-9">小</li>'
			+'<li datascope="qsizxs_d_sin_0-9">单</li><li datascope="qsizxs_d_dou_0-9">双</li><li datascope="qsizxs_d_cle_0-9">清</li></ul></dd>'
			+ '<dd><h5>单号</h5>'
			+ '<ul class="sz-qiu"><li  id="qsizxs_t_0">0</li><li id="qsizxs_t_1">1</li><li id="qsizxs_t_2">2</li>'
			+'<li id="qsizxs_t_3">3</li><li id="qsizxs_t_4">4</li><li id="qsizxs_t_5">5</li><li id="qsizxs_t_6">6</li>'
			+'<li id="qsizxs_t_7">7</li><li id="qsizxs_t_8">8</li><li id="qsizxs_t_9">9</li></ul>'
			+ '<ul class="gongn"><li datascope="qsizxs_t_ful_0-9">全</li><li datascope="qsizxs_t_big_0-9">大</li><li datascope="qsizxs_t_sma_0-9">小</li>'
			+'<li datascope="qsizxs_t_sin_0-9">单</li><li datascope="qsizxs_t_dou_0-9">双</li><li datascope="qsizxs_t_cle_0-9">清</li></ul></dd></dl>',
		bettips : '从三重号中选择一个，从单号中选择一个组成一注。',
		betexample : '投注方案：如投注的三重号是1，单号是2，开奖为1112*，即为中奖',
		bethelp : '玩法：从三重号中选择一个或多个，从单号中选择一个或多个，所选号码与开奖万、千、百、十一致顺序不限，即中奖',
		formatBalls : function(balls) {
			return formatBall(balls['d'])+','+formatBall(balls['t']);
		},
		vali : function() {
			if (!way.get(this.rulecode + ".count.d")
					|| !way.get(this.rulecode + ".count.t")) {
				way.set("Lottery.itemcount", "0");
				way.set("Lottery.total", "0");
			} else if (way.get("Lottery.times")) {
				var d_balls = way.get(this.rulecode + ".balls.d");
				var t_balls = way.get(this.rulecode + ".balls.t");
				var d_count = way.get(this.rulecode + ".count.d");
				var t_count = way.get(this.rulecode + ".count.t");
				
				var itemcount = 0;
				
				if(d_count > 0 && t_count > 0) {
					for(var i = 0; i < d_balls.length; i++) {
						if(d_balls[i] != undefined && d_balls[i] != "") {
							if(t_balls[i] != undefined && t_balls[i] != "") {
								if(t_count > 1) {
									itemcount += t_count-1;
								}
							} else {
								itemcount += t_count;
							}
						}
					}
				}
				
				if (itemcount == 0) {
					itemcount = "0";
				} else {
					itemcount = parseInt(itemcount);
				}
				way.set("Lottery.itemcount", ""+itemcount);
				var total = itemcount * way.get("Lottery.times") * way.get("http://www.yugj881.com/resources/main/lottery/Lottery.yjf") * Env.price;
				if (total)
					way.set("Lottery.total", total.toFixed(4));
				else
					way.set("Lottery.total", "0");

			} else {
				way.set("Lottery.total", "0");
			}
		},
		clear : function() {
			var ss = [ "d", "t" ];
			for (k = 0; k < 2; k++)
				for (i = 0; i <= 9; i++) {
					var item = $("#qsizxs_" + ss[k] + "_" + i);
					if (item.hasClass("cur")) {
						item.trigger('click');
					}
				}
		}
	},
	"sixzhixzhh" : {
		showname : '组合',
		rulecode : 'sixzhixzhh',
		realname : '[后四组合]',
		maxMultiplePerOrder : -1,
		maxPrize : -1,
		maxRecord : 8500,
		fixed : 0.1,
		minMode : 1850,
		calculatePrize : Env.defaultCalculate,
		pageHtml :'<dl class="danqiu" id="sixzhixzhh"><dd><h5>千位</h5>'
			+ '<ul class="sz-qiu"><li  id="sixzhixzhh_q_0">0</li><li id="sixzhixzhh_q_1">1</li><li id="sixzhixzhh_q_2">2</li>'
			+'<li id="sixzhixzhh_q_3">3</li><li id="sixzhixzhh_q_4">4</li><li id="sixzhixzhh_q_5">5</li><li id="sixzhixzhh_q_6">6</li>'
			+'<li id="sixzhixzhh_q_7">7</li><li id="sixzhixzhh_q_8">8</li><li id="sixzhixzhh_q_9">9</li></ul>'
			+ '<ul class="gongn"><li datascope="sixzhixzhh_q_ful_0-9">全</li><li datascope="sixzhixzhh_q_big_0-9">大</li><li datascope="sixzhixzhh_q_sma_0-9">小</li>'
			+'<li datascope="sixzhixzhh_q_sin_0-9">单</li><li datascope="sixzhixzhh_q_dou_0-9">双</li><li datascope="sixzhixzhh_q_cle_0-9">清</li></ul></dd>'
			+ '<dd><h5>百位</h5>'
			+ '<ul class="sz-qiu"><li  id="sixzhixzhh_b_0">0</li><li id="sixzhixzhh_b_1">1</li><li id="sixzhixzhh_b_2">2</li>'
			+'<li id="sixzhixzhh_b_3">3</li><li id="sixzhixzhh_b_4">4</li><li id="sixzhixzhh_b_5">5</li><li id="sixzhixzhh_b_6">6</li>'
			+'<li id="sixzhixzhh_b_7">7</li><li id="sixzhixzhh_b_8">8</li><li id="sixzhixzhh_b_9">9</li></ul>'
			+ '<ul class="gongn"><li datascope="sixzhixzhh_b_ful_0-9">全</li><li datascope="sixzhixzhh_b_big_0-9">大</li><li datascope="sixzhixzhh_b_sma_0-9">小</li>'
			+'<li datascope="sixzhixzhh_b_sin_0-9">单</li><li datascope="sixzhixzhh_b_dou_0-9">双</li><li datascope="sixzhixzhh_b_cle_0-9">清</li></ul></dd>'
			+ '<dd><h5>十位</h5>'
			+ '<ul class="sz-qiu"><li  id="sixzhixzhh_s_0">0</li><li id="sixzhixzhh_s_1">1</li><li id="sixzhixzhh_s_2">2</li>'
			+'<li id="sixzhixzhh_s_3">3</li><li id="sixzhixzhh_s_4">4</li><li id="sixzhixzhh_s_5">5</li><li id="sixzhixzhh_s_6">6</li>'
			+'<li id="sixzhixzhh_s_7">7</li><li id="sixzhixzhh_s_8">8</li><li id="sixzhixzhh_s_9">9</li></ul>'
			+ '<ul class="gongn"><li datascope="sixzhixzhh_s_ful_0-9">全</li><li datascope="sixzhixzhh_s_big_0-9">大</li><li datascope="sixzhixzhh_s_sma_0-9">小</li>'
			+'<li datascope="sixzhixzhh_s_sin_0-9">单</li><li datascope="sixzhixzhh_s_dou_0-9">双</li><li datascope="sixzhixzhh_s_cle_0-9">清</li></ul></dd>'
			+ '<dd><h5>个位</h5>'
			+ '<ul class="sz-qiu"><li  id="sixzhixzhh_g_0">0</li><li id="sixzhixzhh_g_1">1</li><li id="sixzhixzhh_g_2">2</li>'
			+'<li id="sixzhixzhh_g_3">3</li><li id="sixzhixzhh_g_4">4</li><li id="sixzhixzhh_g_5">5</li><li id="sixzhixzhh_g_6">6</li>'
			+'<li id="sixzhixzhh_g_7">7</li><li id="sixzhixzhh_g_8">8</li><li id="sixzhixzhh_g_9">9</li></ul>'
			+ '<ul class="gongn"><li datascope="sixzhixzhh_g_ful_0-9">全</li><li datascope="sixzhixzhh_g_big_0-9">大</li><li datascope="sixzhixzhh_g_sma_0-9">小</li>'
			+'<li datascope="sixzhixzhh_g_sin_0-9">单</li><li datascope="sixzhixzhh_g_dou_0-9">双</li><li datascope="sixzhixzhh_g_cle_0-9">清</li></ul></dd></dl>',
		bettips : '从千、百、十、个位各选一个号码。',
		betexample : '投注方案：*1234；开奖号码：*1234',
		bethelp : '玩法：从千位、百位、十位、个位中选择一个4位数号码组成4注。如下单1234，是4注，分拆为四星1234，三星234，二星34，一星4，所选号码与开奖号码全部相同，且顺序一致，即为中奖。',
		formatBalls : function(balls) {
			return formatBall(balls['q'])+','+formatBall(balls['b'])+','+formatBall(balls['s'])+','+formatBall(balls['g']);
		},
		vali : function() {
			if (!way.get(this.rulecode + ".count.q")
					|| !way.get(this.rulecode + ".count.b")
					|| !way.get(this.rulecode + ".count.s")
					|| !way.get(this.rulecode + ".count.g")) {
				way.set("Lottery.itemcount", "0");
				way.set("Lottery.total", "0");
			} else if (way.get("Lottery.times")) {
				var q = way.get(this.rulecode + ".count.q");
				var b = way.get(this.rulecode + ".count.b");
				var s = way.get(this.rulecode + ".count.s");
				var g = way.get(this.rulecode + ".count.g");
				
				//var itemcount = q*b*s*g + b*s*g + s*g + g;
				var itemcount = q*b*s*g*4;
				way.set("Lottery.itemcount", ""+itemcount);
				var total = itemcount * way.get("Lottery.times")
						* way.get("http://www.yugj881.com/resources/main/lottery/Lottery.yjf") * Env.price;
				if (total)
					way.set("Lottery.total", total.toFixed(4));
				else
					way.set("Lottery.total", "0");
			} else {
				way.set("Lottery.total", "0");
			}
		},
		clear : function() {
			var ss = [ "q", "b", "s", "g" ];
			for (k = 0; k < 4; k++)
				for (i = 0; i <= 9; i++) {
					var item = $("#sixzhixzhh_" + ss[k] + "_" + i);
					if (item.hasClass("cur")) {
						item.trigger('click');
					}
				}
		}
	},
	"hsizxes" : {
		showname : '组选',
		rulecode : 'hsizxes',
		realname : '[后四星_组选24]',
		maxMultiplePerOrder : -1,
		maxPrize : -1,
		maxRecord : -1,
		fixed : 0.1,
		minMode : 1850,
		calculatePrize : Env.defaultCalculate,
		pageHtml :'<dl class="danqiu" id="hsizxes"><dd><h5>组选24</h5>'
			+ '<ul class="sz-qiu"><li  id="hsizxes_zu_0">0</li><li id="hsizxes_zu_1">1</li><li id="hsizxes_zu_2">2</li>'
			+'<li id="hsizxes_zu_3">3</li><li id="hsizxes_zu_4">4</li><li id="hsizxes_zu_5">5</li><li id="hsizxes_zu_6">6</li>'
			+'<li id="hsizxes_zu_7">7</li><li id="hsizxes_zu_8">8</li><li id="hsizxes_zu_9">9</li></ul>'
			+ '<ul class="gongn"><li datascope="hsizxes_zu_ful_0-9">全</li><li datascope="hsizxes_zu_big_0-9">大</li><li datascope="hsizxes_zu_sma_0-9">小</li>'
			+'<li datascope="hsizxes_zu_sin_0-9">单</li><li datascope="hsizxes_zu_dou_0-9">双</li><li datascope="hsizxes_zu_cle_0-9">清</li></ul></dd></dl>',
		bettips : '至少选择四个号码组成一注。',
		betexample : '投注方案：选择1234（展开为*1234，*1243，*1324，*1342，*1423，*1432...）,开奖为*4321，即为中奖',
		bethelp : '玩法：后四组选24：选4个或多个，所选号码与开奖千、百、十、个一致顺序不限，即中奖',
		vali : function() {
			if (!way.get(this.rulecode + ".count.zu")
					|| way.get(this.rulecode + ".count.zu") < 4) {
				way.set("Lottery.itemcount", "0");
				way.set("Lottery.total", "0");
			} else if (way.get("Lottery.times")) {
				var itemcount = way.get(this.rulecode + ".count.zu");
				itemcount = itemcount * (itemcount - 1) * (itemcount - 2) * (itemcount - 3) / 24;
				way.set("Lottery.itemcount", ""+itemcount);
				var total = itemcount * way.get("Lottery.times")
						* way.get("http://www.yugj881.com/resources/main/lottery/Lottery.yjf") * Env.price;
				if (total)
					way.set("Lottery.total", total.toFixed(4));
				else
					way.set("Lottery.total", "0");
			} else {
				way.set("Lottery.total", "0");
			}
		},
		clear : function() {
			var ss = [ "zu" ];
			for (k = 0; k < 1; k++)
				for (i = 0; i <= 9; i++) {
					var item = $("#hsizxes_" + ss[k] + "_" + i);
					if (item.hasClass("cur")) {
						item.trigger('click');
					}
				}
		}
	},
	"hsizxye" : {
		showname : '组选',
		rulecode : 'hsizxye',
		realname : '[后四星_组选12]',
		maxMultiplePerOrder : -1,
		maxPrize : -1,
		maxRecord : -1,
		fixed : 0.1,
		minMode : 1850,
		calculatePrize : Env.defaultCalculate,
		pageHtml :'<dl class="danqiu" id="hsizxye"><dd><h5>二重号</h5>'
			+ '<ul class="sz-qiu"><li  id="hsizxye_d_0">0</li><li id="hsizxye_d_1">1</li><li id="hsizxye_d_2">2</li>'
			+'<li id="hsizxye_d_3">3</li><li id="hsizxye_d_4">4</li><li id="hsizxye_d_5">5</li><li id="hsizxye_d_6">6</li>'
			+'<li id="hsizxye_d_7">7</li><li id="hsizxye_d_8">8</li><li id="hsizxye_d_9">9</li></ul>'
			+ '<ul class="gongn"><li datascope="hsizxye_d_ful_0-9">全</li><li datascope="hsizxye_d_big_0-9">大</li><li datascope="hsizxye_d_sma_0-9">小</li>'
			+'<li datascope="hsizxye_d_sin_0-9">单</li><li datascope="hsizxye_d_dou_0-9">双</li><li datascope="hsizxye_d_cle_0-9">清</li></ul></dd>'
			+ '<dd><h5>单号</h5>'
			+ '<ul class="sz-qiu"><li  id="hsizxye_t_0">0</li><li id="hsizxye_t_1">1</li><li id="hsizxye_t_2">2</li>'
			+'<li id="hsizxye_t_3">3</li><li id="hsizxye_t_4">4</li><li id="hsizxye_t_5">5</li><li id="hsizxye_t_6">6</li>'
			+'<li id="hsizxye_t_7">7</li><li id="hsizxye_t_8">8</li><li id="hsizxye_t_9">9</li></ul>'
			+ '<ul class="gongn"><li datascope="hsizxye_t_ful_0-9">全</li><li datascope="hsizxye_t_big_0-9">大</li><li datascope="hsizxye_t_sma_0-9">小</li>'
			+'<li datascope="hsizxye_t_sin_0-9">单</li><li datascope="hsizxye_t_dou_0-9">双</li><li datascope="hsizxye_t_cle_0-9">清</li></ul></dd></dl>',
		bettips : '从二重号中选择一个，从单号中选择两个组成一注。',
		betexample : '投注方案：如投注的二重号是1，单号是23，开奖为*1123，即为中奖',
		bethelp : '玩法：从二重号中选择一个或多个，从单号中选择两个或多个，所选号码与开奖万、千、百、十一致顺序不限，即中奖',
		formatBalls : function(balls) {
			return formatBall(balls['d'])+','+formatBall(balls['t']);
		},
		vali : function() {
			if (!way.get(this.rulecode + ".count.d")
					|| !way.get(this.rulecode + ".count.t")) {
				way.set("Lottery.itemcount", "0");
				way.set("Lottery.total", "0");
			} else if (way.get("Lottery.times")) {
				var d_balls = way.get(this.rulecode + ".balls.d");
				var t_balls = way.get(this.rulecode + ".balls.t");
				var d_count = way.get(this.rulecode + ".count.d");
				var t_count = way.get(this.rulecode + ".count.t");

				var itemcount = 0;
				
				if(d_count > 0 && t_count > 1) {
					for(var i = 0; i < d_balls.length; i++) {
						if(d_balls[i] != undefined && d_balls[i] != "") {
							if(t_balls[i] != undefined && t_balls[i] != "") {
								if(t_count > 2) {
									itemcount += (t_count-1)*(t_count-2)/2;
								}
							} else {
								itemcount += t_count*(t_count-1)/2;
							}
						}
					}
				}

				if (itemcount == 0) {
					itemcount = "0";
				} else {
					itemcount = parseInt(itemcount);
				}
				way.set("Lottery.itemcount", ""+itemcount);
				var total = itemcount * way.get("Lottery.times") * way.get("http://www.yugj881.com/resources/main/lottery/Lottery.yjf") * Env.price;
				if (total)
					way.set("Lottery.total", total.toFixed(4));
				else
					way.set("Lottery.total", "0");

			} else {
				way.set("Lottery.total", "0");
			}
		},
		clear : function() {
			var ss = [ "d", "t" ];
			for (k = 0; k < 2; k++)
				for (i = 0; i <= 9; i++) {
					var item = $("#hsizxye_" + ss[k] + "_" + i);
					if (item.hasClass("cur")) {
						item.trigger('click');
					}
				}
		}
	},
	"hsizxl" : {
		showname : '组选',
		rulecode : 'hsizxl',
		realname : '[后四星_组选6]',
		maxMultiplePerOrder : -1,
		maxPrize : -1,
		maxRecord : -1,
		fixed : 0.1,
		minMode : 1850,
		calculatePrize : Env.defaultCalculate,
		pageHtml :'<dl class="danqiu" id="hsizxl"><dd><h5>组选6</h5>'
			+ '<ul class="sz-qiu"><li  id="hsizxl_zu_0">0</li><li id="hsizxl_zu_1">1</li><li id="hsizxl_zu_2">2</li>'
			+'<li id="hsizxl_zu_3">3</li><li id="hsizxl_zu_4">4</li><li id="hsizxl_zu_5">5</li><li id="hsizxl_zu_6">6</li>'
			+'<li id="hsizxl_zu_7">7</li><li id="hsizxl_zu_8">8</li><li id="hsizxl_zu_9">9</li></ul>'
			+ '<ul class="gongn"><li datascope="hsizxl_zu_ful_0-9">全</li><li datascope="hsizxl_zu_big_0-9">大</li><li datascope="hsizxl_zu_sma_0-9">小</li>'
			+'<li datascope="hsizxl_zu_sin_0-9">单</li><li datascope="hsizxl_zu_dou_0-9">双</li><li datascope="hsizxl_zu_cle_0-9">清</li></ul></dd></dl>',
		bettips : '至少选择二个号码组成一注。',
		betexample : '投注方案：选择12（展开为*1122，*1212，*1221，*2112，*2121，*2211...）,开奖为*1122，即为中奖',
		bethelp : '玩法：后四组选6：选2个或多个，所选号码与开奖千、百、十、个一致顺序不限，即中奖',
		vali : function() {
			if (!way.get(this.rulecode + ".count.zu")
					|| way.get(this.rulecode + ".count.zu") < 2) {
				way.set("Lottery.itemcount", "0");
				way.set("Lottery.total", "0");
			} else if (way.get("Lottery.times")) {
				var itemcount = way.get(this.rulecode + ".count.zu");
				itemcount = itemcount * (itemcount -1)/ 2;
				way.set("Lottery.itemcount", ""+itemcount);
				var total = itemcount * way.get("Lottery.times")
						* way.get("http://www.yugj881.com/resources/main/lottery/Lottery.yjf") * Env.price;
				if (total)
					way.set("Lottery.total", total.toFixed(4));
				else
					way.set("Lottery.total", "0");
			} else {
				way.set("Lottery.total", "0");
			}
		},
		clear : function() {
			var ss = [ "zu" ];
			for (k = 0; k < 1; k++)
				for (i = 0; i <= 9; i++) {
					var item = $("#hsizxl_" + ss[k] + "_" + i);
					if (item.hasClass("cur")) {
						item.trigger('click');
					}
				}
		}
	},
	"hsizxs" : {
		showname : '组选',
		rulecode : 'hsizxs',
		realname : '[后四星_组选4]',
		maxMultiplePerOrder : -1,
		maxPrize : -1,
		maxRecord : -1,
		fixed : 0.1,
		minMode : 1850,
		calculatePrize : Env.defaultCalculate,
		pageHtml :'<dl class="danqiu" id="hsizxs"><dd><h5>三重号</h5>'
			+ '<ul class="sz-qiu"><li  id="hsizxs_d_0">0</li><li id="hsizxs_d_1">1</li><li id="hsizxs_d_2">2</li>'
			+'<li id="hsizxs_d_3">3</li><li id="hsizxs_d_4">4</li><li id="hsizxs_d_5">5</li><li id="hsizxs_d_6">6</li>'
			+'<li id="hsizxs_d_7">7</li><li id="hsizxs_d_8">8</li><li id="hsizxs_d_9">9</li></ul>'
			+ '<ul class="gongn"><li datascope="hsizxs_d_ful_0-9">全</li><li datascope="hsizxs_d_big_0-9">大</li><li datascope="hsizxs_d_sma_0-9">小</li>'
			+'<li datascope="hsizxs_d_sin_0-9">单</li><li datascope="hsizxs_d_dou_0-9">双</li><li datascope="hsizxs_d_cle_0-9">清</li></ul></dd>'
			+ '<dd><h5>单号</h5>'
			+ '<ul class="sz-qiu"><li  id="hsizxs_t_0">0</li><li id="hsizxs_t_1">1</li><li id="hsizxs_t_2">2</li>'
			+'<li id="hsizxs_t_3">3</li><li id="hsizxs_t_4">4</li><li id="hsizxs_t_5">5</li><li id="hsizxs_t_6">6</li>'
			+'<li id="hsizxs_t_7">7</li><li id="hsizxs_t_8">8</li><li id="hsizxs_t_9">9</li></ul>'
			+ '<ul class="gongn"><li datascope="hsizxs_t_ful_0-9">全</li><li datascope="hsizxs_t_big_0-9">大</li><li datascope="hsizxs_t_sma_0-9">小</li>'
			+'<li datascope="hsizxs_t_sin_0-9">单</li><li datascope="hsizxs_t_dou_0-9">双</li><li datascope="hsizxs_t_cle_0-9">清</li></ul></dd></dl>',
		bettips : '从三重号中选择一个，从单号中选择一个组成一注。',
		betexample : '投注方案：如投注的三重号是1，单号是2，开奖为*1112，即为中奖',
		bethelp : '玩法：从三重号中选择一个或多个，从单号中选择一个或多个，所选号码与开奖万、千、百、十一致顺序不限，即中奖',
		formatBalls : function(balls) {
			return formatBall(balls['d'])+','+formatBall(balls['t']);
		},
		vali : function() {
			if (!way.get(this.rulecode + ".count.d")
					|| !way.get(this.rulecode + ".count.t")) {
				way.set("Lottery.itemcount", "0");
				way.set("Lottery.total", "0");
			} else if (way.get("Lottery.times")) {
				var d_balls = way.get(this.rulecode + ".balls.d");
				var t_balls = way.get(this.rulecode + ".balls.t");
				var d_count = way.get(this.rulecode + ".count.d");
				var t_count = way.get(this.rulecode + ".count.t");
				
				var itemcount = 0;
				
				if(d_count > 0 && t_count > 0) {
					for(var i = 0; i < d_balls.length; i++) {
						if(d_balls[i] != undefined && d_balls[i] != "") {
							if(t_balls[i] != undefined && t_balls[i] != "") {
								if(t_count > 1) {
									itemcount += t_count-1;
								}
							} else {
								itemcount += t_count;
							}
						}
					}
				}

				if (itemcount == 0) {
					itemcount = "0";
				} else {
					itemcount = parseInt(itemcount);
				}
				way.set("Lottery.itemcount", ""+itemcount);
				var total = itemcount * way.get("Lottery.times")
						* way.get("http://www.yugj881.com/resources/main/lottery/Lottery.yjf") * Env.price;
				if (total)
					way.set("Lottery.total", total.toFixed(4));
				else
					way.set("Lottery.total", "0");

			} else {
				way.set("Lottery.total", "0");
			}
		},
		clear : function() {
			var ss = [ "d", "t" ];
			for (k = 0; k < 2; k++)
				for (i = 0; i <= 9; i++) {
					var item = $("#hsizxs_" + ss[k] + "_" + i);
					if (item.hasClass("cur")) {
						item.trigger('click');
					}
				}
		}
	},
	"sxzhixfsq" : {
		showname : '复式',
		rulecode : 'sxzhixfsq',
		realname : '[前三星_复式]',
		maxMultiplePerOrder : -1,
		maxPrize : -1,
		maxRecord : 850,
		
		fixed : 1,
		minMode : 1850,
		calculatePrize : Env.defaultCalculate,
		pageHtml : '<dl class="danqiu" id="sxzhixfsq"><dd><h5>万位</h5>'
			+ '<ul class="sz-qiu"><li  id="sxzhixfsq_w_0">0</li><li id="sxzhixfsq_w_1">1</li><li id="sxzhixfsq_w_2">2</li>'
			+'<li id="sxzhixfsq_w_3">3</li><li id="sxzhixfsq_w_4">4</li><li id="sxzhixfsq_w_5">5</li><li id="sxzhixfsq_w_6">6</li>'
			+'<li id="sxzhixfsq_w_7">7</li><li id="sxzhixfsq_w_8">8</li><li id="sxzhixfsq_w_9">9</li></ul>'
			+ '<ul class="gongn"><li datascope="sxzhixfsq_w_ful_0-9">全</li><li datascope="sxzhixfsq_w_big_0-9">大</li><li datascope="sxzhixfsq_w_sma_0-9">小</li>'
			+'<li datascope="sxzhixfsq_w_sin_0-9">单</li><li datascope="sxzhixfsq_w_dou_0-9">双</li><li datascope="sxzhixfsq_w_cle_0-9">清</li></ul></dd>'
			+ '<dd><h5>千位</h5>'
			+ '<ul class="sz-qiu"><li  id="sxzhixfsq_q_0">0</li><li id="sxzhixfsq_q_1">1</li><li id="sxzhixfsq_q_2">2</li>'
			+'<li id="sxzhixfsq_q_3">3</li><li id="sxzhixfsq_q_4">4</li><li id="sxzhixfsq_q_5">5</li><li id="sxzhixfsq_q_6">6</li>'
			+'<li id="sxzhixfsq_q_7">7</li><li id="sxzhixfsq_q_8">8</li><li id="sxzhixfsq_q_9">9</li></ul>'
			+ '<ul class="gongn"><li datascope="sxzhixfsq_q_ful_0-9">全</li><li datascope="sxzhixfsq_q_big_0-9">大</li><li datascope="sxzhixfsq_q_sma_0-9">小</li>'
			+'<li datascope="sxzhixfsq_q_sin_0-9">单</li><li datascope="sxzhixfsq_q_dou_0-9">双</li><li datascope="sxzhixfsq_q_cle_0-9">清</li></ul></dd>'
			+ '<dd><h5>百位</h5>'
			+ '<ul class="sz-qiu"><li  id="sxzhixfsq_b_0">0</li><li id="sxzhixfsq_b_1">1</li><li id="sxzhixfsq_b_2">2</li>'
			+'<li id="sxzhixfsq_b_3">3</li><li id="sxzhixfsq_b_4">4</li><li id="sxzhixfsq_b_5">5</li><li id="sxzhixfsq_b_6">6</li>'
			+'<li id="sxzhixfsq_b_7">7</li><li id="sxzhixfsq_b_8">8</li><li id="sxzhixfsq_b_9">9</li></ul>'
			+ '<ul class="gongn"><li datascope="sxzhixfsq_b_ful_0-9">全</li><li datascope="sxzhixfsq_b_big_0-9">大</li><li datascope="sxzhixfsq_b_sma_0-9">小</li>'
			+'<li datascope="sxzhixfsq_b_sin_0-9">单</li><li datascope="sxzhixfsq_b_dou_0-9">双</li><li datascope="sxzhixfsq_b_cle_0-9">清</li></ul></dd></dl>',
		bettips : '从万、千、百位各选一个号码组成一注。',
		betexample : '投注方案：234**；开奖号码：234**',
		bethelp : '玩法：从万位、千位、百位中选择一个3位数号码组成一注，所选号码与开奖号码全部相同，且顺序一致，即为中奖。',
		formatBalls : function(balls) {
			return formatBall(balls['w'])+','+formatBall(balls['q'])+','+formatBall(balls['b']);
		},
		vali : function() {
			if (!way.get(this.rulecode + ".count.w")
					|| !way.get(this.rulecode + ".count.q")
					|| !way.get(this.rulecode + ".count.b")) {
				way.set("Lottery.itemcount", "0");
				way.set("Lottery.total", "0");
			} else if (way.get("Lottery.times")) {
				var itemcount = way.get(this.rulecode + ".count.w")
						* way.get(this.rulecode + ".count.q")
						* way.get(this.rulecode + ".count.b");
				way.set("Lottery.itemcount", ""+itemcount);
				var total = itemcount * way.get("Lottery.times")
						* way.get("http://www.yugj881.com/resources/main/lottery/Lottery.yjf") * Env.price;
				if (total)
					way.set("Lottery.total", total.toFixed(4));
				else
					way.set("Lottery.total", "0");
			} else {
				way.set("Lottery.total", "0");
			}
		},
		clear : function() {
			var ss = [ "w", "q", "b" ];
			for (k = 0; k < 3; k++)
				for (i = 0; i <= 9; i++) {
					var item = $("#sxzhixfsq_" + ss[k] + "_" + i);
					if (item.hasClass("cur")) {
						item.trigger('click');
					}
				}
		}
	},
	"sxzhixdsq" : {
		showname : '单式',
		rulecode : 'sxzhixdsq',
		realname : '[前三星_单式]',
		maxMultiplePerOrder : -1,
		maxPrize : -1,
		maxRecord : 850,
		
		fixed : 1,
		minMode : 1850,
		calculatePrize : Env.defaultCalculate,
		bettips : '手动输入号码，至少输入1个三位数号码组成一注。',
		betexample : '投注方案：234**； 开奖号码：234**，即中前三星直选一等奖',
		bethelp : '玩法：手动输入一个3位数号码组成一注，所选号码的万位、千位、百位与开奖号码相同，且顺序一致，即为中奖。',
		textarea : {},
		vali : function(k) {
			var itemcount = 0;
			if (way.get("Lottery.context")) {
				var v = way.get("Lottery.context");
				var reg = /\b[0-9]{3}\b/g;
				// 去重复
				var sszz = util_unique(v, reg);
				sszz = sszz.sort();
				if (sszz) {
					itemcount = sszz.length;
					way.set("Lottery.contexts", sszz);
				}
			}
			if (way.get("Lottery.times")) {
				if (itemcount)
					way.set("Lottery.itemcount", ""+itemcount);
				else
					way.set("Lottery.itemcount", "0");
				var total = itemcount * way.get("Lottery.times")
						* way.get("http://www.yugj881.com/resources/main/lottery/Lottery.yjf") * Env.price;
				if (total)
					way.set("Lottery.total", total.toFixed(4));
				else
					way.set("Lottery.total", "0");
			} else {
				way.set("Lottery.itemcount", "0");
				way.set("Lottery.total", "0");
			}
		},
		changeContext : function(e) {
			var k = String.fromCharCode(e.which);
			if (isNaN(parseInt(k))) {
				if (k != ' ' && k != ',' && k != ';')
					e.returnValue = false;
			}
		},
		clear : function() {
			way.set("Lottery.context", "");
		}
	},
	"sxzuxzsq" : {
		showname : '组三',
		rulecode : 'sxzuxzsq',
		realname : '[前三星_组三]',
		maxMultiplePerOrder : -1,
		maxPrize : -1,
		maxRecord : -1,
		
		fixed : 3,
		minMode : 1850,
		calculatePrize : Env.defaultCalculate,
		pageHtml :'<dl class="danqiu" id="sxzuxzsq"><dd><h5>组三</h5>'
			+ '<ul class="sz-qiu"><li  id="sxzuxzsq_zu_0">0</li><li id="sxzuxzsq_zu_1">1</li><li id="sxzuxzsq_zu_2">2</li>'
			+'<li id="sxzuxzsq_zu_3">3</li><li id="sxzuxzsq_zu_4">4</li><li id="sxzuxzsq_zu_5">5</li><li id="sxzuxzsq_zu_6">6</li>'
			+'<li id="sxzuxzsq_zu_7">7</li><li id="sxzuxzsq_zu_8">8</li><li id="sxzuxzsq_zu_9">9</li></ul>'
			+ '<ul class="gongn"><li datascope="sxzuxzsq_zu_ful_0-9">全</li><li datascope="sxzuxzsq_zu_big_0-9">大</li><li datascope="sxzuxzsq_zu_sma_0-9">小</li>'
			+'<li datascope="sxzuxzsq_zu_sin_0-9">单</li><li datascope="sxzuxzsq_zu_dou_0-9">双</li><li datascope="sxzuxzsq_zu_cle_0-9">清</li></ul></dd></dl>',
		bettips : '至少选择两个号码组成一注。',
		betexample : '投注方案：选择12（展开为122**，212**，221** 和 112**、121**、211**）,开奖为212** 或 121**，即为中奖。',
		bethelp : '玩法：前三组三：选2个或多个，所选号码与开奖万、千、百一致顺序不限，即中奖',
		vali : function() {
			if (!way.get(this.rulecode + ".count.zu")
					|| way.get(this.rulecode + ".count.zu") < 2) {
				way.set("Lottery.itemcount", "0");
				way.set("Lottery.total", "0");
			} else if (way.get("Lottery.times")) {
				var itemcount = way.get(this.rulecode + ".count.zu");
				itemcount = itemcount * (itemcount - 1);
				way.set("Lottery.itemcount", ""+itemcount);
				var total = itemcount * way.get("Lottery.times")
						* way.get("http://www.yugj881.com/resources/main/lottery/Lottery.yjf") * Env.price;
				if (total)
					way.set("Lottery.total", total.toFixed(4));
				else
					way.set("Lottery.total", "0");
			} else {
				way.set("Lottery.total", "0");
			}
		},
		clear : function() {
			var ss = [ "zu" ];
			for (k = 0; k < 1; k++)
				for (i = 0; i <= 9; i++) {
					var item = $("#sxzuxzsq_" + ss[k] + "_" + i);
					if (item.hasClass("cur")) {
						item.trigger('click');
					}
				}
		}
	},
	"sxzuxzsdtq" : {
		showname : '组三',
		rulecode : 'sxzuxzsdtq',
		realname : '[前三星_组三胆拖]',
		maxMultiplePerOrder : -1,
		maxPrize : -1,
		maxRecord : -1,
		fixed : 3,
		minMode : 1850,
		calculatePrize : Env.defaultCalculate,
		pageHtml : '<dl class="danqiu" id="sxzuxzsdtq"><dd><h5>胆码</h5>'
			+ '<ul class="sz-qiu"><li  id="sxzuxzsdtq_d_0">0</li><li id="sxzuxzsdtq_d_1">1</li><li id="sxzuxzsdtq_d_2">2</li>'
			+'<li id="sxzuxzsdtq_d_3">3</li><li id="sxzuxzsdtq_d_4">4</li><li id="sxzuxzsdtq_d_5">5</li><li id="sxzuxzsdtq_d_6">6</li>'
			+'<li id="sxzuxzsdtq_d_7">7</li><li id="sxzuxzsdtq_d_8">8</li><li id="sxzuxzsdtq_d_9">9</li></ul>'
			+ '<ul class="gongn"><li datascope="sxzuxzsdtq_d_ful_0-9">全</li><li datascope="sxzuxzsdtq_d_big_0-9">大</li><li datascope="sxzuxzsdtq_d_sma_0-9">小</li>'
			+'<li datascope="sxzuxzsdtq_d_sin_0-9">单</li><li datascope="sxzuxzsdtq_d_dou_0-9">双</li><li datascope="sxzuxzsdtq_d_cle_0-9">清</li></ul></dd>'
			+ '<dd><h5>拖码</h5>'
			+ '<ul class="sz-qiu"><li  id="sxzuxzsdtq_t_0">0</li><li id="sxzuxzsdtq_t_1">1</li><li id="sxzuxzsdtq_t_2">2</li>'
			+'<li id="sxzuxzsdtq_t_3">3</li><li id="sxzuxzsdtq_t_4">4</li><li id="sxzuxzsdtq_t_5">5</li><li id="sxzuxzsdtq_t_6">6</li>'
			+'<li id="sxzuxzsdtq_t_7">7</li><li id="sxzuxzsdtq_t_8">8</li><li id="sxzuxzsdtq_t_9">9</li></ul>'
			+ '<ul class="gongn"><li datascope="sxzuxzsdtq_t_ful_0-9">全</li><li datascope="sxzuxzsdtq_t_big_0-9">大</li><li datascope="sxzuxzsdtq_t_sma_0-9">小</li>'
			+'<li datascope="sxzuxzsdtq_t_sin_0-9">单</li><li datascope="sxzuxzsdtq_t_dou_0-9">双</li><li datascope="sxzuxzsdtq_t_cle_0-9">清</li></ul></dd></dl>',
		bettips : '只能选择一个胆码，一个以上的拖码。开奖号码前三位中出现对子且号码相同即中奖。',
		betexample : '投注方案：如投注的胆码是1，拖码是2，开奖号码是11234，即中奖。',
		bethelp : '玩法：胆码个数只能一个，拖码个数为1个以上',
		textarea : {},
		formatBalls : function(balls) {
			return formatBall(balls['d'])+','+formatBall(balls['t']);
		},
		vali : function(e) {

			if (!way.get(this.rulecode + ".count.d")
					|| !way.get(this.rulecode + ".count.t")) {
				way.set("Lottery.itemcount", "0");
				way.set("Lottery.total", "0");
			} else if (way.get("Lottery.times")) {

				var d_balls = way.get(this.rulecode + ".balls.d");
				var t_balls = way.get(this.rulecode + ".balls.t");

				if (d_balls && d_balls.length > 0 && t_balls
						&& t_balls.length > 0) {
					var isfor = true;
					for (i = 0; isfor && i < d_balls.length; i++)
						if (d_balls[i])
							for (j = 0; j < t_balls.length; j++)
								if (t_balls[j] && t_balls[j] == d_balls[i]) {
									var ss = e.target.id.split("_");
									var balls = way.get(ss[0] + ".balls."
											+ ss[1]);
									var count = way.get(ss[0] + ".count."
											+ ss[1]);
									if ($(e.target).hasClass("cur")) {
										$(e.target).removeClass("cur");
										balls[eval(ss[2])] = "";
										way.set(ss[0] + ".count." + ss[1],
												count - 1);
									} else {
										$(e.target).addClass("cur");
										balls[eval(ss[2])] = ss[2];
										way.set(ss[0] + ".count." + ss[1],
												count + 1);
									}
									isfor = false;
									popTips('胆码拖码数字不能相同', "error");
									break;
								}
				}

				var d_count = way.get(this.rulecode + ".count.d");
				var t_count = way.get(this.rulecode + ".count.t");
				var itemcount = 0;

				if (d_count == 1 && t_count >= 1) {

					var op_flag = false;

					for (var oo = 0; oo < d_balls.length; oo++) {
						if (d_balls[oo] != undefined && d_balls[oo] != "") {
							for (var mm = 0; mm < t_balls.length; mm++) {
								if (t_balls[mm] != undefined
										&& t_balls[mm] != "") {
									if (parseInt(t_balls[mm]) == parseInt(d_balls[oo])) {
										op_flag = true;
										break;
									}
								}
							}
						}

						if (op_flag == true) {
							break;
						}
					}

					if (op_flag == false) {
						if (d_count == 1) {
							if (t_count >= 1) {
								itemcount = t_count * 2;
							}
						}
					}
				}

				if (itemcount == 0) {
					itemcount = "0";
				} else {
					itemcount = parseInt(itemcount);
				}

				way.set("Lottery.itemcount", ""+itemcount);
				var total = itemcount * way.get("Lottery.times")
						* way.get("http://www.yugj881.com/resources/main/lottery/Lottery.yjf") * Env.price;
				if (total)
					way.set("Lottery.total", total.toFixed(4));
				else
					way.set("Lottery.total", "0");

			} else {
				way.set("Lottery.total", "0");
			}

		},
		clear : function() {
			var ss = [ "d", "t" ];
			for (var k = 0; k < 2; k++)
				for (var i = 0; i <= 9; i++) {
					var item = $("#sxzuxzsdtq_" + ss[k] + "_" + i);
					if (item.hasClass("cur")) {
						item.trigger('click');
					}
				}
		}
	},
	"sxzuxzlq" : {
		showname : '组六',
		rulecode : 'sxzuxzlq',
		realname : '[前三星_组六]',
		maxMultiplePerOrder : -1,
		maxPrize : -1,
		maxRecord : -1,
		
		fixed : 6,
		minMode : 1850,
		calculatePrize : Env.defaultCalculate,
		pageHtml :'<dl class="danqiu" id="sxzuxzlq"><dd><h5>组六</h5>'
			+ '<ul class="sz-qiu"><li  id="sxzuxzlq_zu_0">0</li><li id="sxzuxzlq_zu_1">1</li><li id="sxzuxzlq_zu_2">2</li>'
			+'<li id="sxzuxzlq_zu_3">3</li><li id="sxzuxzlq_zu_4">4</li><li id="sxzuxzlq_zu_5">5</li><li id="sxzuxzlq_zu_6">6</li>'
			+'<li id="sxzuxzlq_zu_7">7</li><li id="sxzuxzlq_zu_8">8</li><li id="sxzuxzlq_zu_9">9</li></ul>'
			+ '<ul class="gongn"><li datascope="sxzuxzlq_zu_ful_0-9">全</li><li datascope="sxzuxzlq_zu_big_0-9">大</li><li datascope="sxzuxzlq_zu_sma_0-9">小</li>'
			+'<li datascope="sxzuxzlq_zu_sin_0-9">单</li><li datascope="sxzuxzlq_zu_dou_0-9">双</li><li datascope="sxzuxzlq_zu_cle_0-9">清</li></ul></dd></dl>',
		bettips : '至少选择三个号码组成一注。',
		betexample : '投注方案：选择123（展开为123**，132**，231**，213**，312**，321**）,开奖为321**，即为中奖',
		bethelp : '玩法：前三组六：选3个或多个，所选号码与开奖万、千、百一致顺序不限，即中奖',
		vali : function() {
			if (!way.get(this.rulecode + ".count.zu")
					|| way.get(this.rulecode + ".count.zu") < 3) {
				way.set("Lottery.itemcount", "0");
				way.set("Lottery.total", "0");
			} else if (way.get("Lottery.times")) {
				var itemcount = way.get(this.rulecode + ".count.zu");
				itemcount = itemcount * (itemcount - 1) * (itemcount - 2) / 6;
				way.set("Lottery.itemcount", ""+itemcount);
				var total = itemcount * way.get("Lottery.times")
						* way.get("http://www.yugj881.com/resources/main/lottery/Lottery.yjf") * Env.price;
				if (total)
					way.set("Lottery.total", total.toFixed(4));
				else
					way.set("Lottery.total", "0");
			} else {
				way.set("Lottery.total", "0");
			}
		},
		clear : function() {
			var ss = [ "zu" ];
			for (k = 0; k < 1; k++)
				for (i = 0; i <= 9; i++) {
					var item = $("#sxzuxzlq_" + ss[k] + "_" + i);
					if (item.hasClass("cur")) {
						item.trigger('click');
					}
				}
		}
	},
	"sxzuxzldtq" : {
		showname : '组六',
		rulecode : 'sxzuxzldtq',
		realname : '[前三星_组六胆拖]',
		maxMultiplePerOrder : -1,
		maxPrize : -1,
		maxRecord : -1,
		fixed : 6,
		minMode : 1850,
		calculatePrize : Env.defaultCalculate,
		pageHtml : '<dl class="danqiu" id="sxzuxzldtq"><dd><h5>胆码</h5>'
			+ '<ul class="sz-qiu"><li  id="sxzuxzldtq_d_0">0</li><li id="sxzuxzldtq_d_1">1</li><li id="sxzuxzldtq_d_2">2</li>'
			+'<li id="sxzuxzldtq_d_3">3</li><li id="sxzuxzldtq_d_4">4</li><li id="sxzuxzldtq_d_5">5</li><li id="sxzuxzldtq_d_6">6</li>'
			+'<li id="sxzuxzldtq_d_7">7</li><li id="sxzuxzldtq_d_8">8</li><li id="sxzuxzldtq_d_9">9</li></ul>'
			+ '<ul class="gongn"><li datascope="sxzuxzldtq_d_ful_0-9">全</li><li datascope="sxzuxzldtq_d_big_0-9">大</li><li datascope="sxzuxzldtq_d_sma_0-9">小</li>'
			+'<li datascope="sxzuxzldtq_d_sin_0-9">单</li><li datascope="sxzuxzldtq_d_dou_0-9">双</li><li datascope="sxzuxzldtq_d_cle_0-9">清</li></ul></dd>'
			+ '<dd><h5>拖码</h5>'
			+ '<ul class="sz-qiu"><li  id="sxzuxzldtq_t_0">0</li><li id="sxzuxzldtq_t_1">1</li><li id="sxzuxzldtq_t_2">2</li>'
			+'<li id="sxzuxzldtq_t_3">3</li><li id="sxzuxzldtq_t_4">4</li><li id="sxzuxzldtq_t_5">5</li><li id="sxzuxzldtq_t_6">6</li>'
			+'<li id="sxzuxzldtq_t_7">7</li><li id="sxzuxzldtq_t_8">8</li><li id="sxzuxzldtq_t_9">9</li></ul>'
			+ '<ul class="gongn"><li datascope="sxzuxzldtq_t_ful_0-9">全</li><li datascope="sxzuxzldtq_t_big_0-9">大</li><li datascope="sxzuxzldtq_t_sma_0-9">小</li>'
			+'<li datascope="sxzuxzldtq_t_sin_0-9">单</li><li datascope="sxzuxzldtq_t_dou_0-9">双</li><li datascope="sxzuxzldtq_t_cle_0-9">清</li></ul></dd></dl>',
		bettips : '选择胆码拖码总数大于等于3(胆码个数最多为两个)组成的投注号码，投注的号码与开奖号码的前三位号码相符，即为中奖！(选择的胆码必须全中)。',
		betexample : '投注方案：如选择胆码1，拖码2 7，开奖号码为72172，前三呈组六模式，即中奖！',
		bethelp : '玩法：选择胆码拖码总数大于等于3(胆码个数最多为两个)组成的投注号码，投注的号码与开奖号码的前三位号码相符，即为中奖！(选择的胆码必须全中)。',
		textarea : {},
		formatBalls : function(balls) {
			return formatBall(balls['d'])+','+formatBall(balls['t']);
		},
		vali : function(e) {
			if (!way.get(this.rulecode + ".count.d")
					|| !way.get(this.rulecode + ".count.t")) {
				way.set("Lottery.itemcount", "0");
				way.set("Lottery.total", "0");
			} else if (way.get("Lottery.times")) {

				var d_count = way.get(this.rulecode + ".count.d");
				var t_count = way.get(this.rulecode + ".count.t");
				var d_balls = way.get(this.rulecode + ".balls.d");
				var t_balls = way.get(this.rulecode + ".balls.t");

				if (d_balls && d_balls.length > 0 && t_balls
						&& t_balls.length > 0) {
					var isfor = true;
					for (i = 0; isfor && i < d_balls.length; i++)
						if (d_balls[i])
							for (j = 0; j < t_balls.length; j++)
								if (t_balls[j] && t_balls[j] == d_balls[i]) {
									var ss = e.target.id.split("_");
									var balls = way.get(ss[0] + ".balls."
											+ ss[1]);
									var count = way.get(ss[0] + ".count."
											+ ss[1]);
									if ($(e.target).hasClass("cur")) {
										$(e.target).removeClass("cur");
										balls[eval(ss[2])] = "";
										way.set(ss[0] + ".count." + ss[1],
												count - 1);
									} else {
										$(e.target).addClass("cur");
										balls[eval(ss[2])] = ss[2];
										way.set(ss[0] + ".count." + ss[1],
												count + 1);
									}
									popTips('胆码拖码数字不能相同', "error");
									isfor = false;
									return;
								}
				}

				var f_flag = false;

				for (var i = 0; i < d_balls.length; i++) {
					if (d_balls[i] != undefined && d_balls[i] != "") {
						for (var g = 0; g < t_balls.length; g++) {
							if (t_balls[g] != undefined && t_balls[g] != "") {
								if (parseInt(d_balls[i]) == parseInt(t_balls[g])) {
									f_flag = true;
									break;
								}
							}
						}
					}
					if (f_flag) {
						break;
					}
				}

				var itemcount = 0;

				if (f_flag == false) {
					if (d_count <= 2 && d_count > 0) {
						if (d_count == 1) {
							if (t_count >= 2) {
								itemcount = t_count * (t_count - 1) / 2;
							}
						} else if (d_count == 2) {
							if (t_count >= 1) {
								itemcount = t_count;
							}
						}
					}
				}

				if (itemcount == 0) {
					itemcount = "0";
				} else {
					itemcount = parseInt(itemcount);
				}
				way.set("Lottery.itemcount", ""+itemcount);
				var total = itemcount * way.get("Lottery.times")
						* way.get("http://www.yugj881.com/resources/main/lottery/Lottery.yjf") * Env.price;
				if (total)
					way.set("Lottery.total", total.toFixed(4));
				else
					way.set("Lottery.total", "0");

			} else {
				way.set("Lottery.total", "0");
			}

		},
		clear : function() {
			var ss = [ "d", "t" ];
			for (var k = 0; k < 2; k++)
				for (var i = 0; i <= 9; i++) {
					var item = $("#sxzuxzldtq_" + ss[k] + "_" + i);
					if (item.hasClass("cur")) {
						item.trigger('click');
					}
				}
		}
	},
	"sxhhzxq" : {
		showname : '混合组选',
		rulecode : 'sxhhzxq',
		realname : '[前三星_混合组选]',
		maxMultiplePerOrder : -1,
		maxPrize : -1,
		maxRecord : -1,
		obtainMaxBetNumberPerOrder : function(currentRecodNumber) {
			var max_p_n = 2;

			if (currentRecodNumber >= max_p_n) {
				return max_p_n;
			} else {
				return currentRecodNumber;
			}
		},
		fixed : 6,
		s_fixed : 3,
		minMode : 1850,
		calculatePrize : Env.defaultCalculate,
		bettips : '手动输入号码，至少输入1个三位数号码组成一注。',
		betexample : '投注方案：手动输入123、455，开奖号码为321**即前组六奖，开奖号码为545**即前组三奖',
		bethelp : '玩法：前三混合：键盘手动输入购买号码，3个数字为一注，开奖号码的万位、千位、百位符合前三的组三或组六均为中奖。',
		textarea : {},
		vali : function(k) {
			var itemcount = 0;
			if (way.get("Lottery.context")) {
				var v = way.get("Lottery.context");
				var reg = /\b[0-9]{3}\b/g;
				// 去重复
				var sszz = util_unique(v, reg, 1, true, true);
				sszz = sszz.sort();
				if (sszz) {
					itemcount = sszz.length;
					way.set("Lottery.contexts", sszz);
				}
			}

			if (way.get("Lottery.times")) {
				if (itemcount)
					way.set("Lottery.itemcount", ""+itemcount);
				else
					way.set("Lottery.itemcount", "0");
				var total = itemcount * way.get("Lottery.times")
						* way.get("http://www.yugj881.com/resources/main/lottery/Lottery.yjf") * Env.price;
				if (total)
					way.set("Lottery.total", total.toFixed(4));
				else
					way.set("Lottery.total", "0");
			} else {
				way.set("Lottery.itemcount", "0");
				way.set("Lottery.total", "0");
			}
		},
		changeContext : function(e) {
			var k = String.fromCharCode(e.which);
			if (isNaN(parseInt(k))) {
				if (k != ' ' && k != ',' && k != ';')
					e.returnValue = false;
			}
		},
		clear : function() {
			way.set("Lottery.context", "");
		}
	},
	"sxzhixfsz" : {
		showname : '复式',
		rulecode : 'sxzhixfsz',
		realname : '[中三星_复式]',
		maxMultiplePerOrder : -1,
		maxPrize : -1,
		maxRecord : 850,
		fixed : 1,
		minMode : 1850,
		calculatePrize : Env.defaultCalculate,
		pageHtml : '<dl class="danqiu" id="sxzhixfsz"><dd><h5>千位</h5>'
			+ '<ul class="sz-qiu"><li  id="sxzhixfsz_q_0">0</li><li id="sxzhixfsz_q_1">1</li><li id="sxzhixfsz_q_2">2</li>'
			+'<li id="sxzhixfsz_q_3">3</li><li id="sxzhixfsz_q_4">4</li><li id="sxzhixfsz_q_5">5</li><li id="sxzhixfsz_q_6">6</li>'
			+'<li id="sxzhixfsz_q_7">7</li><li id="sxzhixfsz_q_8">8</li><li id="sxzhixfsz_q_9">9</li></ul>'
			+ '<ul class="gongn"><li datascope="sxzhixfsz_q_ful_0-9">全</li><li datascope="sxzhixfsz_q_big_0-9">大</li><li datascope="sxzhixfsz_q_sma_0-9">小</li>'
			+'<li datascope="sxzhixfsz_q_sin_0-9">单</li><li datascope="sxzhixfsz_q_dou_0-9">双</li><li datascope="sxzhixfsz_q_cle_0-9">清</li></ul></dd>'
			+ '<dd><h5>百位</h5>'
			+ '<ul class="sz-qiu"><li  id="sxzhixfsz_b_0">0</li><li id="sxzhixfsz_b_1">1</li><li id="sxzhixfsz_b_2">2</li>'
			+'<li id="sxzhixfsz_b_3">3</li><li id="sxzhixfsz_b_4">4</li><li id="sxzhixfsz_b_5">5</li><li id="sxzhixfsz_b_6">6</li>'
			+'<li id="sxzhixfsz_b_7">7</li><li id="sxzhixfsz_b_8">8</li><li id="sxzhixfsz_b_9">9</li></ul>'
			+ '<ul class="gongn"><li datascope="sxzhixfsz_b_ful_0-9">全</li><li datascope="sxzhixfsz_b_big_0-9">大</li><li datascope="sxzhixfsz_b_sma_0-9">小</li>'
			+'<li datascope="sxzhixfsz_b_sin_0-9">单</li><li datascope="sxzhixfsz_b_dou_0-9">双</li><li datascope="sxzhixfsz_b_cle_0-9">清</li></ul></dd>'
			+ '<dd><h5>十位</h5>'
			+ '<ul class="sz-qiu"><li  id="sxzhixfsz_s_0">0</li><li id="sxzhixfsz_s_1">1</li><li id="sxzhixfsz_s_2">2</li>'
			+'<li id="sxzhixfsz_s_3">3</li><li id="sxzhixfsz_s_4">4</li><li id="sxzhixfsz_s_5">5</li><li id="sxzhixfsz_s_6">6</li>'
			+'<li id="sxzhixfsz_s_7">7</li><li id="sxzhixfsz_s_8">8</li><li id="sxzhixfsz_s_9">9</li></ul>'
			+ '<ul class="gongn"><li datascope="sxzhixfsz_s_ful_0-9">全</li><li datascope="sxzhixfsz_s_big_0-9">大</li><li datascope="sxzhixfsz_s_sma_0-9">小</li>'
			+'<li datascope="sxzhixfsz_s_sin_0-9">单</li><li datascope="sxzhixfsz_s_dou_0-9">双</li><li datascope="sxzhixfsz_s_cle_0-9">清</li></ul></dd></dl>',
		bettips : '从千、百、十位各选一个号码组成一注。',
		betexample : '投注方案：*345*；开奖号码：*345*',
		bethelp : '玩法：从千位、百位、十位中选择一个3位数号码组成一注，所选号码与开奖号码全部相同，且顺序一致，即为中奖。',
		formatBalls : function(balls) {
			return formatBall(balls['q'])+','+formatBall(balls['b'])+','+formatBall(balls['s']);
		},
		vali : function() {
			if (!way.get(this.rulecode + ".count.q")
					|| !way.get(this.rulecode + ".count.b")
					|| !way.get(this.rulecode + ".count.s")) {
				way.set("Lottery.itemcount", "0");
				way.set("Lottery.total", "0");
			} else if (way.get("Lottery.times")) {
				var itemcount = way.get(this.rulecode + ".count.q")
						* way.get(this.rulecode + ".count.b")
						* way.get(this.rulecode + ".count.s");
				way.set("Lottery.itemcount", ""+itemcount);
				var total = itemcount * way.get("Lottery.times")
						* way.get("http://www.yugj881.com/resources/main/lottery/Lottery.yjf") * Env.price;
				if (total)
					way.set("Lottery.total", total.toFixed(4));
				else
					way.set("Lottery.total", "0");
			} else {
				way.set("Lottery.total", "0");
			}
		},
		clear : function() {
			var ss = [ "q", "b", "s" ];
			for (k = 0; k < 3; k++)
				for (i = 0; i <= 9; i++) {
					var item = $("#sxzhixfsz_" + ss[k] + "_" + i);
					if (item.hasClass("cur")) {
						item.trigger('click');
					}
				}
		}
	},
	"sxzhixdsz" : {
		showname : '单式',
		rulecode : 'sxzhixdsz',
		realname : '[中三星_单式]',
		maxMultiplePerOrder : -1,
		maxPrize : -1,
		maxRecord : 850,
		fixed : 1,
		minMode : 1850,
		calculatePrize : Env.defaultCalculate,
		bettips : '手动输入号码，至少输入1个三位数号码组成一注。',
		betexample : '投注方案：*345*； 开奖号码：*345*，即中中三星直选一等奖',
		bethelp : '玩法：手动输入一个3位数号码组成一注，所选号码的千位、百位、十位与开奖号码相同，且顺序一致，即为中奖。',
		textarea : {},
		vali : function(k) {
			var itemcount = 0;
			if (way.get("Lottery.context")) {
				var v = way.get("Lottery.context");
				var reg = /\b[0-9]{3}\b/g;
				// 去重复
				var sszz = util_unique(v, reg);
				sszz = sszz.sort();
				if (sszz) {
					itemcount = sszz.length;
					way.set("Lottery.contexts", sszz);
				}
			}
			if (way.get("Lottery.times")) {
				if (itemcount)
					way.set("Lottery.itemcount", ""+itemcount);
				else
					way.set("Lottery.itemcount", "0");
				var total = itemcount * way.get("Lottery.times")
						* way.get("http://www.yugj881.com/resources/main/lottery/Lottery.yjf") * Env.price;
				if (total)
					way.set("Lottery.total", total.toFixed(4));
				else
					way.set("Lottery.total", "0");
			} else {
				way.set("Lottery.itemcount", "0");
				way.set("Lottery.total", "0");
			}
		},
		changeContext : function(e) {
			var k = String.fromCharCode(e.which);
			if (isNaN(parseInt(k))) {
				if (k != ' ' && k != ',' && k != ';')
					e.returnValue = false;
			}
		},
		clear : function() {
			way.set("Lottery.context", "");
		}
	},
	"sxzuxzsz" : {
		showname : '组三',
		rulecode : 'sxzuxzsz',
		realname : '[中三星_组三]',
		maxMultiplePerOrder : -1,
		maxPrize : -1,
		maxRecord : -1,
		fixed : 3,
		minMode : 1850,
		calculatePrize : Env.defaultCalculate,
		pageHtml :'<dl class="danqiu" id="sxzuxzsz"><dd><h5>组三</h5>'
			+ '<ul class="sz-qiu"><li  id="sxzuxzsz_zu_0">0</li><li id="sxzuxzsz_zu_1">1</li><li id="sxzuxzsz_zu_2">2</li>'
			+'<li id="sxzuxzsz_zu_3">3</li><li id="sxzuxzsz_zu_4">4</li><li id="sxzuxzsz_zu_5">5</li><li id="sxzuxzsz_zu_6">6</li>'
			+'<li id="sxzuxzsz_zu_7">7</li><li id="sxzuxzsz_zu_8">8</li><li id="sxzuxzsz_zu_9">9</li></ul>'
			+ '<ul class="gongn"><li datascope="sxzuxzsz_zu_ful_0-9">全</li><li datascope="sxzuxzsz_zu_big_0-9">大</li><li datascope="sxzuxzsz_zu_sma_0-9">小</li>'
			+'<li datascope="sxzuxzsz_zu_sin_0-9">单</li><li datascope="sxzuxzsz_zu_dou_0-9">双</li><li datascope="sxzuxzsz_zu_cle_0-9">清</li></ul></dd></dl>',
		bettips : '至少选择两个号码组成一注。',
		betexample : '投注方案：选择12（展开为*122*，*212*，*221* 和 *112*、*121*、*211*）,开奖为*212* 或 *121*，即为中奖。',
		bethelp : '玩法：中三组三：选2个或多个，所选号码与开奖千、百、十位一致顺序不限，即中奖',
		vali : function() {
			if (!way.get(this.rulecode + ".count.zu")
					|| way.get(this.rulecode + ".count.zu") < 2) {
				way.set("Lottery.itemcount", "0");
				way.set("Lottery.total", "0");
			} else if (way.get("Lottery.times")) {
				var itemcount = way.get(this.rulecode + ".count.zu");
				itemcount = itemcount * (itemcount - 1);
				way.set("Lottery.itemcount", ""+itemcount);
				var total = itemcount * way.get("Lottery.times")
						* way.get("http://www.yugj881.com/resources/main/lottery/Lottery.yjf") * Env.price;
				if (total)
					way.set("Lottery.total", total.toFixed(4));
				else
					way.set("Lottery.total", "0");
			} else {
				way.set("Lottery.total", "0");
			}
		},
		clear : function() {
			var ss = [ "zu" ];
			for (k = 0; k < 1; k++)
				for (i = 0; i <= 9; i++) {
					var item = $("#sxzuxzsz_" + ss[k] + "_" + i);
					if (item.hasClass("cur") ) {
						item.trigger('click');
					}
				}
		}
	},
	"sxzuxzsdtz" : {
		showname : '组三',
		rulecode : 'sxzuxzsdtz',
		realname : '[中三星_组三胆拖]',
		maxMultiplePerOrder : -1,
		maxPrize : -1,
		maxRecord : -1,
		fixed : 3,
		minMode : 1850,
		calculatePrize : Env.defaultCalculate,
		pageHtml : '<dl class="danqiu" id="sxzuxzsdtz"><dd><h5>胆码</h5>'
			+ '<ul class="sz-qiu"><li  id="sxzuxzsdtz_d_0">0</li><li id="sxzuxzsdtz_d_1">1</li><li id="sxzuxzsdtz_d_2">2</li>'
			+'<li id="sxzuxzsdtz_d_3">3</li><li id="sxzuxzsdtz_d_4">4</li><li id="sxzuxzsdtz_d_5">5</li><li id="sxzuxzsdtz_d_6">6</li>'
			+'<li id="sxzuxzsdtz_d_7">7</li><li id="sxzuxzsdtz_d_8">8</li><li id="sxzuxzsdtz_d_9">9</li></ul>'
			+ '<ul class="gongn"><li datascope="sxzuxzsdtz_d_ful_0-9">全</li><li datascope="sxzuxzsdtz_d_big_0-9">大</li><li datascope="sxzuxzsdtz_d_sma_0-9">小</li>'
			+'<li datascope="sxzuxzsdtz_d_sin_0-9">单</li><li datascope="sxzuxzsdtz_d_dou_0-9">双</li><li datascope="sxzuxzsdtz_d_cle_0-9">清</li></ul></dd>'
			+ '<dd><h5>拖码</h5>'
			+ '<ul class="sz-qiu"><li  id="sxzuxzsdtz_t_0">0</li><li id="sxzuxzsdtz_t_1">1</li><li id="sxzuxzsdtz_t_2">2</li>'
			+'<li id="sxzuxzsdtz_t_3">3</li><li id="sxzuxzsdtz_t_4">4</li><li id="sxzuxzsdtz_t_5">5</li><li id="sxzuxzsdtz_t_6">6</li>'
			+'<li id="sxzuxzsdtz_t_7">7</li><li id="sxzuxzsdtz_t_8">8</li><li id="sxzuxzsdtz_t_9">9</li></ul>'
			+ '<ul class="gongn"><li datascope="sxzuxzsdtz_t_ful_0-9">全</li><li datascope="sxzuxzsdtz_t_big_0-9">大</li><li datascope="sxzuxzsdtz_t_sma_0-9">小</li>'
			+'<li datascope="sxzuxzsdtz_t_sin_0-9">单</li><li datascope="sxzuxzsdtz_t_dou_0-9">双</li><li datascope="sxzuxzsdtz_t_cle_0-9">清</li></ul></dd></dl>',
		bettips : '只能选择一个胆码，一个以上的拖码。开奖号码中三位中出现对子且号码相同即中奖。',
		betexample : '投注方案：如投注的胆码是1，拖码是2，开奖号码是31124，即中奖。',
		bethelp : '玩法：胆码个数只能一个，拖码个数为1个以上',
		textarea : {},
		formatBalls : function(balls) {
			return formatBall(balls['d'])+','+formatBall(balls['t']);
		},
		vali : function(e) {
			if (!way.get(this.rulecode + ".count.d")
					|| !way.get(this.rulecode + ".count.t")) {
				way.set("Lottery.itemcount", "0");
				way.set("Lottery.total", "0");
			} else if (way.get("Lottery.times")) {

				var d_balls = way.get(this.rulecode + ".balls.d");
				var t_balls = way.get(this.rulecode + ".balls.t");

				if (d_balls && d_balls.length > 0 && t_balls
						&& t_balls.length > 0) {
					var isfor = true;
					for (i = 0; isfor && i < d_balls.length; i++)
						if (d_balls[i])
							for (j = 0; j < t_balls.length; j++)
								if (t_balls[j] && t_balls[j] == d_balls[i]) {
									var ss = e.target.id.split("_");
									var balls = way.get(ss[0] + ".balls."
											+ ss[1]);
									var count = way.get(ss[0] + ".count."
											+ ss[1]);
									if ($(e.target).hasClass("cur")) {
										$(e.target).removeClass("cur");
										balls[eval(ss[2])] = "";
										way.set(ss[0] + ".count." + ss[1],
												count - 1);
									} else {
										$(e.target).addClass("cur");
										balls[eval(ss[2])] = ss[2];
										way.set(ss[0] + ".count." + ss[1],
												count + 1);
									}
									popTips('胆码拖码数字不能相同', "error");
									isfor = false;
									break;
								}
				}

				var d_count = way.get(this.rulecode + ".count.d");
				var t_count = way.get(this.rulecode + ".count.t");
				var itemcount = 0;

				if (d_count == 1 && t_count >= 1) {
					var op_flag = false;
					for (var oo = 0; oo < d_balls.length; oo++) {
						if (d_balls[oo] != undefined && d_balls[oo] != "") {
							for (var mm = 0; mm < t_balls.length; mm++) {
								if (t_balls[mm] != undefined
										&& t_balls[mm] != "") {
									if (parseInt(t_balls[mm]) == parseInt(d_balls[oo])) {
										op_flag = true;
										break;
									}
								}
							}
						}

						if (op_flag == true) {
							break;
						}
					}

					if (op_flag == false) {
						if (d_count == 1) {
							if (t_count >= 1) {
								itemcount = t_count * 2;
							}
						}
					}
				}

				if (itemcount == 0) {
					itemcount = "0";
				} else {
					itemcount = parseInt(itemcount);
				}

				way.set("Lottery.itemcount", ""+itemcount);
				var total = itemcount * way.get("Lottery.times")
						* way.get("http://www.yugj881.com/resources/main/lottery/Lottery.yjf") * Env.price;
				if (total)
					way.set("Lottery.total", total.toFixed(4));
				else
					way.set("Lottery.total", "0");
			} else {
				way.set("Lottery.total", "0");
			}

		},
		clear : function() {
			var ss = [ "d", "t" ];
			for (var k = 0; k < 2; k++)
				for (var i = 0; i <= 9; i++) {
					var item = $("#sxzuxzsdtz_" + ss[k] + "_" + i);
					if (item.hasClass("cur")) {
						item.trigger('click');
					}
				}
		}
	},
	"sxzuxzlz" : {
		showname : '组六',
		rulecode : 'sxzuxzlz',
		realname : '[中三星_组六]',
		maxMultiplePerOrder : -1,
		maxPrize : -1,
		maxRecord : -1,
		fixed : 6,
		minMode : 1850,
		calculatePrize : Env.defaultCalculate,
		pageHtml :'<dl class="danqiu" id="sxzuxzlz"><dd><h5>组六</h5>'
			+ '<ul class="sz-qiu"><li  id="sxzuxzlz_zu_0">0</li><li id="sxzuxzlz_zu_1">1</li><li id="sxzuxzlz_zu_2">2</li>'
			+'<li id="sxzuxzlz_zu_3">3</li><li id="sxzuxzlz_zu_4">4</li><li id="sxzuxzlz_zu_5">5</li><li id="sxzuxzlz_zu_6">6</li>'
			+'<li id="sxzuxzlz_zu_7">7</li><li id="sxzuxzlz_zu_8">8</li><li id="sxzuxzlz_zu_9">9</li></ul>'
			+ '<ul class="gongn"><li datascope="sxzuxzlz_zu_ful_0-9">全</li><li datascope="sxzuxzlz_zu_big_0-9">大</li><li datascope="sxzuxzlz_zu_sma_0-9">小</li>'
			+'<li datascope="sxzuxzlz_zu_sin_0-9">单</li><li datascope="sxzuxzlz_zu_dou_0-9">双</li><li datascope="sxzuxzlz_zu_cle_0-9">清</li></ul></dd></dl>',
		bettips : '至少选择三个号码组成一注。',
		betexample : '投注方案：选择123（展开为*123*，*132*，*231*，*213*，*312*，*321*）,开奖为*321*，即为中奖。',
		bethelp : '玩法：中三组六：选3个或多个，所选号码与开奖千、百、十位一致顺序不限，即中奖',
		vali : function() {
			if (!way.get(this.rulecode + ".count.zu")
					|| way.get(this.rulecode + ".count.zu") < 3) {
				way.set("Lottery.itemcount", "0");
				way.set("Lottery.total", "0");
			} else if (way.get("Lottery.times")) {
				var itemcount = way.get(this.rulecode + ".count.zu");
				itemcount = itemcount * (itemcount - 1) * (itemcount - 2) / 6;
				way.set("Lottery.itemcount", ""+itemcount);
				var total = itemcount * way.get("Lottery.times")
						* way.get("http://www.yugj881.com/resources/main/lottery/Lottery.yjf") * Env.price;
				if (total)
					way.set("Lottery.total", total.toFixed(4));
				else
					way.set("Lottery.total", "0");
			} else {
				way.set("Lottery.total", "0");
			}
		},
		clear : function() {
			var ss = [ "zu" ];
			for (k = 0; k < 1; k++)
				for (i = 0; i <= 9; i++) {
					var item = $("#sxzuxzlz_" + ss[k] + "_" + i);
					if (item.hasClass("cur")) {
						item.trigger('click');
					}
				}
		}
	},
	"sxzuxzldtz" : {
		showname : '组六',
		rulecode : 'sxzuxzldtz',
		realname : '[中三星_组六胆拖]',
		maxMultiplePerOrder : -1,
		maxPrize : -1,
		maxRecord : -1,
		fixed : 6,
		minMode : 1850,
		calculatePrize : Env.defaultCalculate,
		pageHtml : '<dl class="danqiu" id="sxzuxzldtz"><dd><h5>胆码</h5>'
			+ '<ul class="sz-qiu"><li  id="sxzuxzldtz_d_0">0</li><li id="sxzuxzldtz_d_1">1</li><li id="sxzuxzldtz_d_2">2</li>'
			+'<li id="sxzuxzldtz_d_3">3</li><li id="sxzuxzldtz_d_4">4</li><li id="sxzuxzldtz_d_5">5</li><li id="sxzuxzldtz_d_6">6</li>'
			+'<li id="sxzuxzldtz_d_7">7</li><li id="sxzuxzldtz_d_8">8</li><li id="sxzuxzldtz_d_9">9</li></ul>'
			+ '<ul class="gongn"><li datascope="sxzuxzldtz_d_ful_0-9">全</li><li datascope="sxzuxzldtz_d_big_0-9">大</li><li datascope="sxzuxzldtz_d_sma_0-9">小</li>'
			+'<li datascope="sxzuxzldtz_d_sin_0-9">单</li><li datascope="sxzuxzldtz_d_dou_0-9">双</li><li datascope="sxzuxzldtz_d_cle_0-9">清</li></ul></dd>'
			+ '<dd><h5>拖码</h5>'
			+ '<ul class="sz-qiu"><li  id="sxzuxzldtz_t_0">0</li><li id="sxzuxzldtz_t_1">1</li><li id="sxzuxzldtz_t_2">2</li>'
			+'<li id="sxzuxzldtz_t_3">3</li><li id="sxzuxzldtz_t_4">4</li><li id="sxzuxzldtz_t_5">5</li><li id="sxzuxzldtz_t_6">6</li>'
			+'<li id="sxzuxzldtz_t_7">7</li><li id="sxzuxzldtz_t_8">8</li><li id="sxzuxzldtz_t_9">9</li></ul>'
			+ '<ul class="gongn"><li datascope="sxzuxzldtz_t_ful_0-9">全</li><li datascope="sxzuxzldtz_t_big_0-9">大</li><li datascope="sxzuxzldtz_t_sma_0-9">小</li>'
			+'<li datascope="sxzuxzldtz_t_sin_0-9">单</li><li datascope="sxzuxzldtz_t_dou_0-9">双</li><li datascope="sxzuxzldtz_t_cle_0-9">清</li></ul></dd></dl>',
		bettips : '选择胆码拖码总数大于等于3(胆码个数最多为两个)组成的投注号码，投注的号码与开奖号码的中三位号码相符，即为中奖！(选择的胆码必须全中)。',
		betexample : '投注方案：如选择胆码1，拖码2 7，开奖号码为52178，中三呈组六模式，即中奖！',
		bethelp : '玩法：选择胆码拖码总数大于等于3(胆码个数最多为两个)组成的投注号码，投注的号码与开奖号码的中三位号码相符，即为中奖！(选择的胆码必须全中)。',
		textarea : {},
		formatBalls : function(balls) {
			return formatBall(balls['d'])+','+formatBall(balls['t']);
		},
		vali : function(e) {
			if (!way.get(this.rulecode + ".count.d")
					|| !way.get(this.rulecode + ".count.t")) {
				way.set("Lottery.itemcount", "0");
				way.set("Lottery.total", "0");
			} else if (way.get("Lottery.times")) {
				var d_count = way.get(this.rulecode + ".count.d");
				var t_count = way.get(this.rulecode + ".count.t");
				var d_balls = way.get(this.rulecode + ".balls.d");
				var t_balls = way.get(this.rulecode + ".balls.t");

				if (d_balls && d_balls.length > 0 && t_balls
						&& t_balls.length > 0) {
					var isfor = true;
					for (i = 0; isfor && i < d_balls.length; i++)
						if (d_balls[i])
							for (j = 0; j < t_balls.length; j++)
								if (t_balls[j] && t_balls[j] == d_balls[i]) {
									var ss = e.target.id.split("_");
									var balls = way.get(ss[0] + ".balls."
											+ ss[1]);
									var count = way.get(ss[0] + ".count."
											+ ss[1]);
									if ($(e.target).hasClass("cur")) {
										$(e.target).removeClass("cur");
										balls[eval(ss[2])] = "";
										way.set(ss[0] + ".count." + ss[1],
												count - 1);
									} else {
										$(e.target).addClass("cur");
										balls[eval(ss[2])] = ss[2];
										way.set(ss[0] + ".count." + ss[1],
												count + 1);
									}
									popTips('胆码拖码数字不能相同', "error");
									isfor = false;
									return;
								}
				}

				var f_flag = false;

				for (var i = 0; i < d_balls.length; i++) {
					if (d_balls[i] != undefined && d_balls[i] != "") {
						for (var g = 0; g < t_balls.length; g++) {
							if (t_balls[g] != undefined && t_balls[g] != "") {
								if (parseInt(d_balls[i]) == parseInt(t_balls[g])) {
									f_flag = true;
									break;
								}
							}
						}
					}
					if (f_flag) {
						break;
					}
				}

				var itemcount = 0;

				if (f_flag == false) {
					if (d_count <= 2 && d_count > 0) {
						if (d_count == 1) {
							if (t_count >= 2) {
								itemcount = t_count * (t_count - 1) / 2;
							}
						} else if (d_count == 2) {
							if (t_count >= 1) {
								itemcount = t_count;
							}
						}
					}
				}

				if (itemcount == 0) {
					itemcount = "0";
				} else {
					itemcount = parseInt(itemcount);
				}
				way.set("Lottery.itemcount", ""+itemcount);
				var total = itemcount * way.get("Lottery.times")
						* way.get("http://www.yugj881.com/resources/main/lottery/Lottery.yjf") * Env.price;
				if (total)
					way.set("Lottery.total", total.toFixed(4));
				else
					way.set("Lottery.total", "0");

			} else {
				way.set("Lottery.total", "0");
			}

		},
		clear : function() {
			var ss = [ "d", "t" ];
			for (var k = 0; k < 2; k++)
				for (var i = 0; i <= 9; i++) {
					var item = $("#sxzuxzldtz_" + ss[k] + "_" + i);
					if (item.hasClass("cur")) {
						item.trigger('click');
					}
				}
		}
	},
	"sxhhzxz" : {
		showname : '混合组选',
		rulecode : 'sxhhzxz',
		realname : '[中三星_混合组选]',
		maxMultiplePerOrder : -1,
		maxPrize : -1,
		maxRecord : -1,
		obtainMaxBetNumberPerOrder : function(currentRecodNumber) {
			var max_p_n = 2;

			if (currentRecodNumber >= max_p_n) {
				return max_p_n;
			} else {
				return currentRecodNumber;
			}
		},
		fixed : 6,
		s_fixed : 3,
		minMode : 1850,
		calculatePrize : Env.defaultCalculate,
		bettips : '手动输入号码，至少输入1个三位数号码组成一注。',
		betexample : '投注方案：手动输入123、455，开奖号码为*321*即中组六奖，开奖号码为*545*即中组三奖',
		bethelp : '玩法：中三混合：键盘手动输入购买号码，3个数字为一注，开奖号码的千位、百位、十位符合中三的组三或组六均为中奖。',
		textarea : {},
		vali : function(k) {
			var itemcount = 0;
			if (way.get("Lottery.context")) {
				var v = way.get("Lottery.context");
				var reg = /\b[0-9]{3}\b/g;
				// 去重复
				var sszz = util_unique(v, reg, 1, true, true);
				sszz = sszz.sort();
				if (sszz) {
					itemcount = sszz.length;
					way.set("Lottery.contexts", sszz);
				}
			}
			if (way.get("Lottery.times")) {
				if (itemcount)
					way.set("Lottery.itemcount", ""+itemcount);
				else
					way.set("Lottery.itemcount", "0");
				var total = itemcount * way.get("Lottery.times")
						* way.get("http://www.yugj881.com/resources/main/lottery/Lottery.yjf") * Env.price;
				if (total)
					way.set("Lottery.total", total.toFixed(4));
				else
					way.set("Lottery.total", "0");
			} else {
				way.set("Lottery.itemcount", "0");
				way.set("Lottery.total", "0");
			}
		},
		changeContext : function(e) {
			var k = String.fromCharCode(e.which);
			if (isNaN(parseInt(k))) {
				if (k != ' ' && k != ',' && k != ';')
					e.returnValue = false;
			}
		},
		clear : function() {
			way.set("Lottery.context", "");
		}
	},
	"sxzhixfsh" : {
		showname : '复式',
		rulecode : 'sxzhixfsh',
		realname : '[后三星_复式]',
		maxMultiplePerOrder : -1,
		maxPrize : -1,
		maxRecord : 850,
		fixed : 1,
		minMode : 1850,
		calculatePrize : Env.defaultCalculate,
		pageHtml :'<dl class="danqiu" id="sxzhixfsh"><dd><h5>百位</h5>'
			+ '<ul class="sz-qiu"><li  id="sxzhixfsh_b_0">0</li><li id="sxzhixfsh_b_1">1</li><li id="sxzhixfsh_b_2">2</li>'
			+'<li id="sxzhixfsh_b_3">3</li><li id="sxzhixfsh_b_4">4</li><li id="sxzhixfsh_b_5">5</li><li id="sxzhixfsh_b_6">6</li>'
			+'<li id="sxzhixfsh_b_7">7</li><li id="sxzhixfsh_b_8">8</li><li id="sxzhixfsh_b_9">9</li></ul>'
			+ '<ul class="gongn"><li datascope="sxzhixfsh_b_ful_0-9">全</li><li datascope="sxzhixfsh_b_big_0-9">大</li><li datascope="sxzhixfsh_b_sma_0-9">小</li>'
			+'<li datascope="sxzhixfsh_b_sin_0-9">单</li><li datascope="sxzhixfsh_b_dou_0-9">双</li><li datascope="sxzhixfsh_b_cle_0-9">清</li></ul></dd>'
			+ '<dd><h5>十位</h5>'
			+ '<ul class="sz-qiu"><li  id="sxzhixfsh_s_0">0</li><li id="sxzhixfsh_s_1">1</li><li id="sxzhixfsh_s_2">2</li>'
			+'<li id="sxzhixfsh_s_3">3</li><li id="sxzhixfsh_s_4">4</li><li id="sxzhixfsh_s_5">5</li><li id="sxzhixfsh_s_6">6</li>'
			+'<li id="sxzhixfsh_s_7">7</li><li id="sxzhixfsh_s_8">8</li><li id="sxzhixfsh_s_9">9</li></ul>'
			+ '<ul class="gongn"><li datascope="sxzhixfsh_s_ful_0-9">全</li><li datascope="sxzhixfsh_s_big_0-9">大</li><li datascope="sxzhixfsh_s_sma_0-9">小</li>'
			+'<li datascope="sxzhixfsh_s_sin_0-9">单</li><li datascope="sxzhixfsh_s_dou_0-9">双</li><li datascope="sxzhixfsh_s_cle_0-9">清</li></ul></dd>'
			+ '<dd><h5>个位</h5>'
			+ '<ul class="sz-qiu"><li  id="sxzhixfsh_g_0">0</li><li id="sxzhixfsh_g_1">1</li><li id="sxzhixfsh_g_2">2</li>'
			+'<li id="sxzhixfsh_g_3">3</li><li id="sxzhixfsh_g_4">4</li><li id="sxzhixfsh_g_5">5</li><li id="sxzhixfsh_g_6">6</li>'
			+'<li id="sxzhixfsh_g_7">7</li><li id="sxzhixfsh_g_8">8</li><li id="sxzhixfsh_g_9">9</li></ul>'
			+ '<ul class="gongn"><li datascope="sxzhixfsh_g_ful_0-9">全</li><li datascope="sxzhixfsh_g_big_0-9">大</li><li datascope="sxzhixfsh_g_sma_0-9">小</li>'
			+'<li datascope="sxzhixfsh_g_sin_0-9">单</li><li datascope="sxzhixfsh_g_dou_0-9">双</li><li datascope="sxzhixfsh_g_cle_0-9">清</li></ul></dd></dl>',
		bettips : '从百、十、个位各选一个号码组成一注。',
		betexample : '投注方案：**345；开奖号码：**345',
		bethelp : '玩法：从百位、十位、个位中选择一个3位数号码组成一注，所选号码与开奖号码全部相同，且顺序一致，即为中奖。',
		formatBalls : function(balls) {
			return formatBall(balls['b'])+','+formatBall(balls['s'])+','+formatBall(balls['g']);
		},
		vali : function() {
			if (!way.get(this.rulecode + ".count.b")
					|| !way.get(this.rulecode + ".count.s")
					|| !way.get(this.rulecode + ".count.g")) {
				way.set("Lottery.itemcount", "0");
				way.set("Lottery.total", "0");
			} else if (way.get("Lottery.times")) {
				var itemcount = way.get(this.rulecode + ".count.b")
						* way.get(this.rulecode + ".count.s")
						* way.get(this.rulecode + ".count.g");
				way.set("Lottery.itemcount", ""+itemcount);
				var total = itemcount * way.get("Lottery.times")
						* way.get("http://www.yugj881.com/resources/main/lottery/Lottery.yjf") * Env.price;
				if (total)
					way.set("Lottery.total", total.toFixed(4));
				else
					way.set("Lottery.total", "0");
			} else {
				way.set("Lottery.total", "0");
			}
		},
		clear : function() {
			var ss = [ "b", "s", "g" ];
			for (k = 0; k < 3; k++)
				for (i = 0; i <= 9; i++) {
					var item = $("#sxzhixfsh_" + ss[k] + "_" + i);
					if (item.hasClass("cur")) {
						item.trigger('click');
					}
				}
		}
	},
	"sxzhixdsh" : {
		showname : '单式',
		rulecode : 'sxzhixdsh',
		realname : '[后三星_单式]',
		maxMultiplePerOrder : -1,
		maxPrize : -1,
		maxRecord : 850,
		fixed : 1,
		minMode : 1850,
		calculatePrize : Env.defaultCalculate,
		bettips : '手动输入号码，至少输入1个三位数号码组成一注。',
		betexample : '投注方案：**345； 开奖号码：**345，即中后三星直选一等奖',
		bethelp : '玩法：手动输入一个3位数号码组成一注，所选号码的百位、十位、个位与开奖号码相同，且顺序一致，即为中奖。',
		textarea : {},
		vali : function(k) {
			var itemcount = 0;
			if (way.get("Lottery.context")) {
				var v = way.get("Lottery.context");
				var reg = /\b[0-9]{3}\b/g;
				// 去重复
				var sszz = util_unique(v, reg);
				sszz = sszz.sort();
				if (sszz) {
					itemcount = sszz.length;
					way.set("Lottery.contexts", sszz);
				}
			}
			if (way.get("Lottery.times")) {
				if (itemcount)
					way.set("Lottery.itemcount", ""+itemcount);
				else
					way.set("Lottery.itemcount", "0");
				var total = itemcount * way.get("Lottery.times")
						* way.get("http://www.yugj881.com/resources/main/lottery/Lottery.yjf") * Env.price;
				if (total)
					way.set("Lottery.total", total.toFixed(4));
				else
					way.set("Lottery.total", "0");
			} else {
				way.set("Lottery.itemcount", "0");
				way.set("Lottery.total", "0");
			}
		},
		changeContext : function(e) {
			var k = String.fromCharCode(e.which);
			if (isNaN(parseInt(k))) {
				if (k != ' ' && k != ',' && k != ';')
					e.returnValue = false;
			}
		},
		clear : function() {
			way.set("Lottery.context", "");
		}
	},
	"sxzuxzsh" : {
		showname : '组三',
		rulecode : 'sxzuxzsh',
		realname : '[后三星_组三]',
		maxMultiplePerOrder : -1,
		maxPrize : -1,
		maxRecord : -1,
		fixed : 3,
		minMode : 1850,
		calculatePrize : Env.defaultCalculate,
		pageHtml :'<dl class="danqiu" id="sxzuxzsh"><dd><h5>组三</h5>'
			+ '<ul class="sz-qiu"><li  id="sxzuxzsh_zu_0">0</li><li id="sxzuxzsh_zu_1">1</li><li id="sxzuxzsh_zu_2">2</li>'
			+'<li id="sxzuxzsh_zu_3">3</li><li id="sxzuxzsh_zu_4">4</li><li id="sxzuxzsh_zu_5">5</li><li id="sxzuxzsh_zu_6">6</li>'
			+'<li id="sxzuxzsh_zu_7">7</li><li id="sxzuxzsh_zu_8">8</li><li id="sxzuxzsh_zu_9">9</li></ul>'
			+ '<ul class="gongn"><li datascope="sxzuxzsh_zu_ful_0-9">全</li><li datascope="sxzuxzsh_zu_big_0-9">大</li><li datascope="sxzuxzsh_zu_sma_0-9">小</li>'
			+'<li datascope="sxzuxzsh_zu_sin_0-9">单</li><li datascope="sxzuxzsh_zu_dou_0-9">双</li><li datascope="sxzuxzsh_zu_cle_0-9">清</li></ul></dd></dl>',
		bettips : '至少选择两个号码组成一注。',
		betexample : '投注方案：选择12（展开为**122，**212，**221 和 **112、**121、**211）,开奖为**212 或 **121，即为中奖。',
		bethelp : '玩法：后三组三：选2个或多个，所选号码与开奖百、十、个位一致顺序不限，即中奖',
		vali : function() {
			if (!way.get(this.rulecode + ".count.zu")
					|| way.get(this.rulecode + ".count.zu") < 2) {
				way.set("Lottery.itemcount", "0");
				way.set("Lottery.total", "0");
			} else if (way.get("Lottery.times")) {
				var itemcount = way.get(this.rulecode + ".count.zu");
				itemcount = itemcount * (itemcount - 1);
				way.set("Lottery.itemcount", ""+itemcount);
				var total = itemcount * way.get("Lottery.times")
						* way.get("http://www.yugj881.com/resources/main/lottery/Lottery.yjf") * Env.price;
				if (total)
					way.set("Lottery.total", total.toFixed(4));
				else
					way.set("Lottery.total", "0");
			} else {
				way.set("Lottery.total", "0");
			}
		},
		clear : function() {
			var ss = [ "zu" ];
			for (k = 0; k < 1; k++)
				for (i = 0; i <= 9; i++) {
					var item = $("#sxzuxzsh_" + ss[k] + "_" + i);
					if (item.hasClass("cur")) {
						item.trigger('click');
					}
				}
		}
	},
	"sxzuxzsdth" : {
		showname : '组三',
		rulecode : 'sxzuxzsdth',
		realname : '[后三星_组三胆拖]',
		maxMultiplePerOrder : -1,
		maxPrize : -1,
		maxRecord : -1,
		fixed : 3,
		minMode : 1850,
		pageHtml : '<dl class="danqiu" id="sxzuxzsdth"><dd><h5>胆码</h5>'
			+ '<ul class="sz-qiu"><li  id="sxzuxzsdth_d_0">0</li><li id="sxzuxzsdth_d_1">1</li><li id="sxzuxzsdth_d_2">2</li>'
			+'<li id="sxzuxzsdth_d_3">3</li><li id="sxzuxzsdth_d_4">4</li><li id="sxzuxzsdth_d_5">5</li><li id="sxzuxzsdth_d_6">6</li>'
			+'<li id="sxzuxzsdth_d_7">7</li><li id="sxzuxzsdth_d_8">8</li><li id="sxzuxzsdth_d_9">9</li></ul>'
			+ '<ul class="gongn"><li datascope="sxzuxzsdth_d_ful_0-9">全</li><li datascope="sxzuxzsdth_d_big_0-9">大</li><li datascope="sxzuxzsdth_d_sma_0-9">小</li>'
			+'<li datascope="sxzuxzsdth_d_sin_0-9">单</li><li datascope="sxzuxzsdth_d_dou_0-9">双</li><li datascope="sxzuxzsdth_d_cle_0-9">清</li></ul></dd>'
			+ '<dd><h5>拖码</h5>'
			+ '<ul class="sz-qiu"><li  id="sxzuxzsdth_t_0">0</li><li id="sxzuxzsdth_t_1">1</li><li id="sxzuxzsdth_t_2">2</li>'
			+'<li id="sxzuxzsdth_t_3">3</li><li id="sxzuxzsdth_t_4">4</li><li id="sxzuxzsdth_t_5">5</li><li id="sxzuxzsdth_t_6">6</li>'
			+'<li id="sxzuxzsdth_t_7">7</li><li id="sxzuxzsdth_t_8">8</li><li id="sxzuxzsdth_t_9">9</li></ul>'
			+ '<ul class="gongn"><li datascope="sxzuxzsdth_t_ful_0-9">全</li><li datascope="sxzuxzsdth_t_big_0-9">大</li><li datascope="sxzuxzsdth_t_sma_0-9">小</li>'
			+'<li datascope="sxzuxzsdth_t_sin_0-9">单</li><li datascope="sxzuxzsdth_t_dou_0-9">双</li><li datascope="sxzuxzsdth_t_cle_0-9">清</li></ul></dd></dl>',
		calculatePrize : Env.defaultCalculate,
		bettips : '只能选择一个胆码，一个以上的拖码。开奖号码后三位中出现对子且号码相同即中奖。',
		betexample : '投注方案：如投注的胆码是1，拖码是2，开奖号码是34112，即中奖。',
		bethelp : '玩法：胆码个数只能一个，拖码个数为1个以上',
		textarea : {},
		formatBalls : function(balls) {
			return formatBall(balls['d'])+','+formatBall(balls['t']);
		},
		vali : function(e) {
			if (!way.get(this.rulecode + ".count.d")
					|| !way.get(this.rulecode + ".count.t")) {
				way.set("Lottery.itemcount", "0");
				way.set("Lottery.total", "0");
			} else if (way.get("Lottery.times")) {
				var d_balls = way.get(this.rulecode + ".balls.d");
				var t_balls = way.get(this.rulecode + ".balls.t");

				if (d_balls && d_balls.length > 0 && t_balls
						&& t_balls.length > 0) {
					var isfor = true;
					for (i = 0; isfor && i < d_balls.length; i++)
						if (d_balls[i])
							for (j = 0; j < t_balls.length; j++)
								if (t_balls[j] && t_balls[j] == d_balls[i]) {
									var ss = e.target.id.split("_");
									var balls = way.get(ss[0] + ".balls."
											+ ss[1]);
									var count = way.get(ss[0] + ".count."
											+ ss[1]);
									if ($(e.target).hasClass("cur")) {
										$(e.target).removeClass("cur");
										balls[eval(ss[2])] = "";
										way.set(ss[0] + ".count." + ss[1],
												count - 1);
									} else {
										$(e.target).addClass("cur");
										balls[eval(ss[2])] = ss[2];
										way.set(ss[0] + ".count." + ss[1],
												count + 1);
									}
									popTips('胆码拖码数字不能相同', "error");
									isfor = false;
									break;
								}
				}

				var d_count = way.get(this.rulecode + ".count.d");
				var t_count = way.get(this.rulecode + ".count.t");
				var itemcount = 0;

				if (d_count == 1 && t_count >= 1) {
					var op_flag = false;
					for (var oo = 0; oo < d_balls.length; oo++) {
						if (d_balls[oo] != undefined && d_balls[oo] != "") {
							for (var mm = 0; mm < t_balls.length; mm++) {
								if (t_balls[mm] != undefined
										&& t_balls[mm] != "") {
									if (parseInt(t_balls[mm]) == parseInt(d_balls[oo])) {
										op_flag = true;
										break;
									}
								}
							}
						}

						if (op_flag == true) {
							break;
						}
					}

					if (op_flag == false) {
						if (d_count == 1) {
							if (t_count >= 1) {
								itemcount = t_count * 2;
							}
						}
					}
				}

				if (itemcount == 0) {
					itemcount = "0";
				} else {
					itemcount = parseInt(itemcount);
				}

				way.set("Lottery.itemcount", ""+itemcount);
				var total = itemcount * way.get("Lottery.times")
						* way.get("http://www.yugj881.com/resources/main/lottery/Lottery.yjf") * Env.price;
				if (total)
					way.set("Lottery.total", total.toFixed(4));
				else
					way.set("Lottery.total", "0");

			} else {
				way.set("Lottery.total", "0");
			}

		},
		clear : function() {
			var ss = [ "d", "t" ];
			for (var k = 0; k < 2; k++)
				for (var i = 0; i <= 9; i++) {
					var item = $("#sxzuxzsdth_" + ss[k] + "_" + i);
					if (item.hasClass("cur")) {
						item.trigger('click');
					}
				}
		}
	},
	"sxzuxzlh" : {
		showname : '组六',
		rulecode : 'sxzuxzlh',
		realname : '[后三星_组六]',
		maxMultiplePerOrder : -1,
		maxPrize : -1,
		maxRecord : -1,
		fixed : 6,
		minMode : 1850,
		calculatePrize : Env.defaultCalculate,
		pageHtml :'<dl class="danqiu" id="sxzuxzlh"><dd><h5>组六</h5>'
			+ '<ul class="sz-qiu"><li  id="sxzuxzlh_zu_0">0</li><li id="sxzuxzlh_zu_1">1</li><li id="sxzuxzlh_zu_2">2</li>'
			+'<li id="sxzuxzlh_zu_3">3</li><li id="sxzuxzlh_zu_4">4</li><li id="sxzuxzlh_zu_5">5</li><li id="sxzuxzlh_zu_6">6</li>'
			+'<li id="sxzuxzlh_zu_7">7</li><li id="sxzuxzlh_zu_8">8</li><li id="sxzuxzlh_zu_9">9</li></ul>'
			+ '<ul class="gongn"><li datascope="sxzuxzlh_zu_ful_0-9">全</li><li datascope="sxzuxzlh_zu_big_0-9">大</li><li datascope="sxzuxzlh_zu_sma_0-9">小</li>'
			+'<li datascope="sxzuxzlh_zu_sin_0-9">单</li><li datascope="sxzuxzlh_zu_dou_0-9">双</li><li datascope="sxzuxzlh_zu_cle_0-9">清</li></ul></dd></dl>',
		bettips : '至少选择三个号码组成一注。',
		betexample : '投注方案：选择123（展开为**123，**132，**231，**213，**312，**321）,开奖为**321，即为中奖。',
		bethelp : '玩法：后三组六：选3个或多个，所选号码与开奖百、十、个位一致顺序不限，即中奖',
		vali : function() {
			if (!way.get(this.rulecode + ".count.zu")
					|| way.get(this.rulecode + ".count.zu") < 3) {
				way.set("Lottery.itemcount", "0");
				way.set("Lottery.total", "0");
			} else if (way.get("Lottery.times")) {
				var itemcount = way.get(this.rulecode + ".count.zu");
				itemcount = itemcount * (itemcount - 1) * (itemcount - 2) / 6;
				way.set("Lottery.itemcount", ""+itemcount);
				var total = itemcount * way.get("Lottery.times")
						* way.get("http://www.yugj881.com/resources/main/lottery/Lottery.yjf") * Env.price;
				if (total)
					way.set("Lottery.total", total.toFixed(4));
				else
					way.set("Lottery.total", "0");
			} else {
				way.set("Lottery.total", "0");
			}
		},
		clear : function() {
			var ss = [ "zu" ];
			for (k = 0; k < 1; k++)
				for (i = 0; i <= 9; i++) {
					var item = $("#sxzuxzlh_" + ss[k] + "_" + i);
					if (item.hasClass("cur")) {
						item.trigger('click');
					}
				}
		}
	},
	"sxzuxzldth" : {
		showname : '组六',
		rulecode : 'sxzuxzldth',
		realname : '[后三星_组六胆拖]',
		maxMultiplePerOrder : -1,
		maxPrize : -1,
		maxRecord : -1,
		fixed : 6,
		minMode : 1850,
		calculatePrize : Env.defaultCalculate,
		pageHtml : '<dl class="danqiu" id="sxzuxzldth"><dd><h5>胆码</h5>'
			+ '<ul class="sz-qiu"><li  id="sxzuxzldth_d_0">0</li><li id="sxzuxzldth_d_1">1</li><li id="sxzuxzldth_d_2">2</li>'
			+'<li id="sxzuxzldth_d_3">3</li><li id="sxzuxzldth_d_4">4</li><li id="sxzuxzldth_d_5">5</li><li id="sxzuxzldth_d_6">6</li>'
			+'<li id="sxzuxzldth_d_7">7</li><li id="sxzuxzldth_d_8">8</li><li id="sxzuxzldth_d_9">9</li></ul>'
			+ '<ul class="gongn"><li datascope="sxzuxzldth_d_ful_0-9">全</li><li datascope="sxzuxzldth_d_big_0-9">大</li><li datascope="sxzuxzldth_d_sma_0-9">小</li>'
			+'<li datascope="sxzuxzldth_d_sin_0-9">单</li><li datascope="sxzuxzldth_d_dou_0-9">双</li><li datascope="sxzuxzldth_d_cle_0-9">清</li></ul></dd>'
			+ '<dd><h5>拖码</h5>'
			+ '<ul class="sz-qiu"><li  id="sxzuxzldth_t_0">0</li><li id="sxzuxzldth_t_1">1</li><li id="sxzuxzldth_t_2">2</li>'
			+'<li id="sxzuxzldth_t_3">3</li><li id="sxzuxzldth_t_4">4</li><li id="sxzuxzldth_t_5">5</li><li id="sxzuxzldth_t_6">6</li>'
			+'<li id="sxzuxzldth_t_7">7</li><li id="sxzuxzldth_t_8">8</li><li id="sxzuxzldth_t_9">9</li></ul>'
			+ '<ul class="gongn"><li datascope="sxzuxzldth_t_ful_0-9">全</li><li datascope="sxzuxzldth_t_big_0-9">大</li><li datascope="sxzuxzldth_t_sma_0-9">小</li>'
			+'<li datascope="sxzuxzldth_t_sin_0-9">单</li><li datascope="sxzuxzldth_t_dou_0-9">双</li><li datascope="sxzuxzldth_t_cle_0-9">清</li></ul></dd></dl>',
		bettips : '选择胆码拖码总数大于等于3(胆码个数最多为两个)组成的投注号码，投注的号码与开奖号码的后三位号码相符，即为中奖！(选择的胆码必须全中)。',
		betexample : '投注方案：如选择胆码1，拖码2 7，开奖号码为56172，后三呈组六模式，即中奖！',
		bethelp : '玩法：选择胆码拖码总数大于等于3(胆码个数最多为两个)组成的投注号码，投注的号码与开奖号码的后三位号码相符，即为中奖！(选择的胆码必须全中)。',
		textarea : {},
		formatBalls : function(balls) {
			return formatBall(balls['d'])+','+formatBall(balls['t']);
		},
		vali : function(e) {
			if (!way.get(this.rulecode + ".count.d")
					|| !way.get(this.rulecode + ".count.t")) {
				way.set("Lottery.itemcount", "0");
				way.set("Lottery.total", "0");
			} else if (way.get("Lottery.times")) {
				var d_count = way.get(this.rulecode + ".count.d");
				var t_count = way.get(this.rulecode + ".count.t");
				var d_balls = way.get(this.rulecode + ".balls.d");
				var t_balls = way.get(this.rulecode + ".balls.t");

				if (d_balls && d_balls.length > 0 && t_balls
						&& t_balls.length > 0) {
					var isfor = true;
					for (i = 0; isfor && i < d_balls.length; i++)
						if (d_balls[i])
							for (j = 0; j < t_balls.length; j++)
								if (t_balls[j] && t_balls[j] == d_balls[i]) {
									var ss = e.target.id.split("_");
									var balls = way.get(ss[0] + ".balls."
											+ ss[1]);
									var count = way.get(ss[0] + ".count."
											+ ss[1]);
									if ($(e.target).hasClass("cur")) {
										$(e.target).removeClass("cur");
										balls[eval(ss[2])] = "";
										way.set(ss[0] + ".count." + ss[1],
												count - 1);
									} else {
										$(e.target).addClass("cur");
										balls[eval(ss[2])] = ss[2];
										way.set(ss[0] + ".count." + ss[1],
												count + 1);
									}
									popTips('胆码拖码数字不能相同', "error");
									isfor = false;
									return;
								}
				}

				var f_flag = false;

				for (var i = 0; i < d_balls.length; i++) {
					if (d_balls[i] != undefined && d_balls[i] != "") {
						for (var g = 0; g < t_balls.length; g++) {
							if (t_balls[g] != undefined && t_balls[g] != "") {
								if (parseInt(d_balls[i]) == parseInt(t_balls[g])) {
									f_flag = true;
									break;
								}
							}
						}
					}
					if (f_flag) {
						break;
					}
				}

				var itemcount = 0;

				if (f_flag == false) {
					if (d_count <= 2 && d_count > 0) {
						if (d_count == 1) {
							if (t_count >= 2) {
								itemcount = t_count * (t_count - 1) / 2;
							}
						} else if (d_count == 2) {
							if (t_count >= 1) {
								itemcount = t_count;
							}
						}
					}
				}

				if (itemcount == 0) {
					itemcount = "0";
				} else {
					itemcount = parseInt(itemcount);
				}
				way.set("Lottery.itemcount", ""+itemcount);
				var total = itemcount * way.get("Lottery.times")
						* way.get("http://www.yugj881.com/resources/main/lottery/Lottery.yjf") * Env.price;
				if (total)
					way.set("Lottery.total", total.toFixed(4));
				else
					way.set("Lottery.total", "0");
			} else {
				way.set("Lottery.total", "0");
			}

		},
		clear : function() {
			var ss = [ "d", "t" ];
			for (var k = 0; k < 2; k++)
				for (var i = 0; i <= 9; i++) {
					var item = $("#sxzuxzldth_" + ss[k] + "_" + i);
					if (item.hasClass("cur")) {
						item.trigger('click');
					}
				}
		}
	},
	"sxhhzxh" : {
		showname : '混合组选',
		rulecode : 'sxhhzxh',
		realname : '[后三星_混合组选]',
		maxMultiplePerOrder : -1,
		maxPrize : -1,
		maxRecord : -1,
		obtainMaxBetNumberPerOrder : function(currentRecodNumber) {

			var max_p_n = 2;

			if (currentRecodNumber >= max_p_n) {

				return max_p_n;
			} else {

				return currentRecodNumber;
			}

		},
		
		fixed : 6,
		s_fixed : 3,
		minMode : 1850,
		calculatePrize : Env.defaultCalculate,
		bettips : '手动输入号码，至少输入1个三位数号码组成一注。',
		betexample : '投注方案：手动输入123、455，开奖号码为**321即中组六奖，开奖号码为**545即中组三奖',
		bethelp : '玩法：后三混合：键盘手动输入购买号码，3个数字为一注，开奖号码的百位、十位、个位符合中三的组三或组六均为中奖。',
		textarea : {},
		vali : function(k) {
			var itemcount = 0;
			if (way.get("Lottery.context")) {
				var v = way.get("Lottery.context");
				var reg = /\b[0-9]{3}\b/g;
				// 去重复
				var sszz = util_unique(v, reg, 1, true, true);
				sszz = sszz.sort();
				if (sszz) {
					itemcount = sszz.length;
					way.set("Lottery.contexts", sszz);
				}
			}
			if (way.get("Lottery.times")) {
				if (itemcount)
					way.set("Lottery.itemcount", ""+itemcount);
				else
					way.set("Lottery.itemcount", "0");
				var total = itemcount * way.get("Lottery.times")
						* way.get("http://www.yugj881.com/resources/main/lottery/Lottery.yjf") * Env.price;
				if (total)
					way.set("Lottery.total", total.toFixed(4));
				else
					way.set("Lottery.total", "0");
			} else {
				way.set("Lottery.itemcount", "0");
				way.set("Lottery.total", "0");
			}
		},
		changeContext : function(e) {
			var k = String.fromCharCode(e.which);
			if (isNaN(parseInt(k))) {
				if (k != ' ' && k != ',' && k != ';')
					e.returnValue = false;
			}
		},
		clear : function() {
			way.set("Lottery.context", "");
		}
	},
	"exzhixfsq" : {
		showname : '复式',
		rulecode : 'exzhixfsq',
		realname : '[前二星_复式]',
		maxMultiplePerOrder : -1,
		maxPrize : -1,
		maxRecord : 85,
		
		fixed : 10,
		minMode : 1850,
		calculatePrize : Env.defaultCalculate,
		pageHtml : '<dl class="danqiu" id="exzhixfsq"><dd><h5>万位</h5>'
			+ '<ul class="sz-qiu"><li  id="exzhixfsq_w_0">0</li><li id="exzhixfsq_w_1">1</li><li id="exzhixfsq_w_2">2</li>'
			+'<li id="exzhixfsq_w_3">3</li><li id="exzhixfsq_w_4">4</li><li id="exzhixfsq_w_5">5</li><li id="exzhixfsq_w_6">6</li>'
			+'<li id="exzhixfsq_w_7">7</li><li id="exzhixfsq_w_8">8</li><li id="exzhixfsq_w_9">9</li></ul>'
			+ '<ul class="gongn"><li datascope="exzhixfsq_w_ful_0-9">全</li><li datascope="exzhixfsq_w_big_0-9">大</li><li datascope="exzhixfsq_w_sma_0-9">小</li>'
			+'<li datascope="exzhixfsq_w_sin_0-9">单</li><li datascope="exzhixfsq_w_dou_0-9">双</li><li datascope="exzhixfsq_w_cle_0-9">清</li></ul></dd>'
			+ '<dd><h5>千位</h5>'
			+ '<ul class="sz-qiu"><li  id="exzhixfsq_q_0">0</li><li id="exzhixfsq_q_1">1</li><li id="exzhixfsq_q_2">2</li>'
			+'<li id="exzhixfsq_q_3">3</li><li id="exzhixfsq_q_4">4</li><li id="exzhixfsq_q_5">5</li><li id="exzhixfsq_q_6">6</li>'
			+'<li id="exzhixfsq_q_7">7</li><li id="exzhixfsq_q_8">8</li><li id="exzhixfsq_q_9">9</li></ul>'
			+ '<ul class="gongn"><li datascope="exzhixfsq_q_ful_0-9">全</li><li datascope="exzhixfsq_q_big_0-9">大</li><li datascope="exzhixfsq_q_sma_0-9">小</li>'
			+'<li datascope="exzhixfsq_q_sin_0-9">单</li><li datascope="exzhixfsq_q_dou_0-9">双</li><li datascope="exzhixfsq_q_cle_0-9">清</li></ul></dd></dl>',
		bettips : '从万、千位各选一个号码组成一注。',
		betexample : '投注方案：23***；开奖号码：23***',
		bethelp : '玩法：从万位、千位中选择一个2位数号码组成一注，所选号码与开奖号码全部相同，且顺序一致，即为中奖。',
		formatBalls : function(balls) {
			return formatBall(balls['w'])+','+formatBall(balls['q']);
		},
		vali : function() {
			if (!way.get(this.rulecode + ".count.w")
					|| !way.get(this.rulecode + ".count.q")) {
				way.set("Lottery.itemcount", "0");
				way.set("Lottery.total", "0");
			} else if (way.get("Lottery.times")) {
				var itemcount = way.get(this.rulecode + ".count.w")
						* way.get(this.rulecode + ".count.q");
				way.set("Lottery.itemcount", ""+itemcount);
				var total = itemcount * way.get("Lottery.times")
						* way.get("http://www.yugj881.com/resources/main/lottery/Lottery.yjf") * Env.price;
				if (total)
					way.set("Lottery.total", total.toFixed(4));
				else
					way.set("Lottery.total", "0");
			} else {
				way.set("Lottery.total", "0");
			}
		},
		clear : function() {
			var ss = [ "w", "q" ];
			for (k = 0; k < 2; k++)
				for (i = 0; i <= 9; i++) {
					var item = $("#exzhixfsq_" + ss[k] + "_" + i);
					if (item.hasClass("cur")) {
						item.trigger('click');
					}
				}
		}
	},
	"exzhixdsq" : {
		showname : '单式',
		rulecode : 'exzhixdsq',
		realname : '[前二星_单式]',
		maxMultiplePerOrder : -1,
		maxPrize : -1,
		maxRecord : 85,
		
		fixed : 10,
		minMode : 1850,
		calculatePrize : Env.defaultCalculate,
		bettips : '手动输入号码，至少输入1个二位数号码组成一注。',
		betexample : '投注方案：23***； 开奖号码：23***，即中前二星直选一等奖',
		bethelp : '玩法：手动输入一个2位数号码组成一注，所选号码的万位、千位与开奖号码相同，且顺序一致，即为中奖。',
		textarea : {},
		vali : function(k) {
			var itemcount = 0;
			if (way.get("Lottery.context")) {
				var v = way.get("Lottery.context");
				var reg = /\b[0-9]{2}\b/g;
				// 去重复
				var sszz = util_unique(v, reg);
				sszz = sszz.sort();
				if (sszz) {
					itemcount = sszz.length;
					way.set("Lottery.contexts", sszz);
				}
			}
			if (way.get("Lottery.times")) {
				if (itemcount)
					way.set("Lottery.itemcount", ""+itemcount);
				else
					way.set("Lottery.itemcount", "0");
				var total = itemcount * way.get("Lottery.times")
						* way.get("http://www.yugj881.com/resources/main/lottery/Lottery.yjf") * Env.price;
				if (total)
					way.set("Lottery.total", total.toFixed(4));
				else
					way.set("Lottery.total", "0");
			} else {
				way.set("Lottery.itemcount", "0");
				way.set("Lottery.total", "0");
			}
		},
		changeContext : function(e) {
			var k = String.fromCharCode(e.which);
			if (isNaN(parseInt(k))) {
				if (k != ' ' && k != ',' && k != ';')
					e.returnValue = false;
			}
		},
		clear : function() {
			way.set("Lottery.context", "");
		}
	},
	"exzuxfsq" : {
		showname : '组选复式',
		rulecode : 'exzuxfsq',
		realname : '[前二星_组选复式]',
		maxMultiplePerOrder : -1,
		maxPrize : -1,
		maxRecord : -1,
		
		fixed : 20,
		minMode : 1850,
		calculatePrize : Env.defaultCalculate,
		pageHtml :'<dl class="danqiu" id="exzuxfsq"><dd><h5>前二组选</h5>'
			+ '<ul class="sz-qiu"><li  id="exzuxfsq_zu_0">0</li><li id="exzuxfsq_zu_1">1</li><li id="exzuxfsq_zu_2">2</li>'
			+'<li id="exzuxfsq_zu_3">3</li><li id="exzuxfsq_zu_4">4</li><li id="exzuxfsq_zu_5">5</li><li id="exzuxfsq_zu_6">6</li>'
			+'<li id="exzuxfsq_zu_7">7</li><li id="exzuxfsq_zu_8">8</li><li id="exzuxfsq_zu_9">9</li></ul>'
			+ '<ul class="gongn"><li datascope="exzuxfsq_zu_ful_0-9">全</li><li datascope="exzuxfsq_zu_big_0-9">大</li><li datascope="exzuxfsq_zu_sma_0-9">小</li>'
			+'<li datascope="exzuxfsq_zu_sin_0-9">单</li><li datascope="exzuxfsq_zu_dou_0-9">双</li><li datascope="exzuxfsq_zu_cle_0-9">清</li></ul></dd></dl>',
		bettips : '至少选择两个号码组成一注。',
		betexample : '投注方案：选择12（展开为12***，21***）,开奖为12*** 或 21***，即为中奖。',
		bethelp : '玩法：前二组选复式：从0-9中选2个或多个号码对万位和千位投注，顺序不限，即为中奖',
		vali : function() {
			if (!way.get(this.rulecode + ".count.zu")
					|| way.get(this.rulecode + ".count.zu") < 2) {
				way.set("Lottery.itemcount", "0");
				way.set("Lottery.total", "0");
			} else if (way.get("Lottery.times")) {
				var itemcount = way.get(this.rulecode + ".count.zu");
				itemcount = itemcount * (itemcount - 1) / 2;
				way.set("Lottery.itemcount", ""+itemcount);
				var total = itemcount * way.get("Lottery.times")
						* way.get("http://www.yugj881.com/resources/main/lottery/Lottery.yjf") * Env.price;
				if (total)
					way.set("Lottery.total", total.toFixed(4));
				else
					way.set("Lottery.total", "0");
			} else {
				way.set("Lottery.total", "0");
			}
		},
		clear : function() {
			var ss = [ "zu" ];
			for (k = 0; k < 1; k++)
				for (i = 0; i <= 9; i++) {
					var item = $("#exzuxfsq_" + ss[k] + "_" + i);
					if (item.hasClass("cur")) {
						item.trigger('click');
					}
				}
		}
	},
	"exzuxdsq" : {
		showname : '组选单式',
		rulecode : 'exzuxdsq',
		realname : '[前二星_组选单式]',
		maxMultiplePerOrder : -1,
		maxPrize : -1,
		maxRecord : -1,
		fixed : 20,
		minMode : 1850,
		calculatePrize : Env.defaultCalculate,
		bettips : '手动输入号码，至少输入1个二位数号码组成一注。',
		betexample : '投注方案：手动输入12，开奖号码为12*** 或 21*** 即为中奖',
		bethelp : '玩法：前二组选单式：键盘手动输入购买号码，2个数字为一注，与开奖号码的万位、千位符合且顺序不限，即为中奖。',
		textarea : {},
		vali : function(k) {
			var itemcount = 0;
			if (way.get("Lottery.context")) {
				var v = way.get("Lottery.context");
				var reg = /\b([0-9])(?!\1)([0-9])\b/g;
				// 去重复
				var sszz = util_unique(v, reg, 1, true);
				sszz = sszz.sort();
				if (sszz) {
					itemcount = sszz.length;
					way.set("Lottery.contexts", sszz);
				}
			}
			if (way.get("Lottery.times")) {
				if (itemcount)
					way.set("Lottery.itemcount", ""+itemcount);
				else
					way.set("Lottery.itemcount", "0");
				var total = itemcount * way.get("Lottery.times")
						* way.get("http://www.yugj881.com/resources/main/lottery/Lottery.yjf") * Env.price;
				if (total)
					way.set("Lottery.total", total.toFixed(4));
				else
					way.set("Lottery.total", "0");
			} else {
				way.set("Lottery.itemcount", "0");
				way.set("Lottery.total", "0");
			}
		},
		changeContext : function(e) {
			var k = String.fromCharCode(e.which);
			if (isNaN(parseInt(k))) {
				if (k != ' ' && k != ',' && k != ';')
					e.returnValue = false;
			}
		},
		clear : function() {
			way.set("Lottery.context", "");
		}
	},
	"exzhixfsh" : {
		showname : '复式',
		rulecode : 'exzhixfsh',
		realname : '[后二星_复式]',
		maxMultiplePerOrder : -1,
		maxPrize : -1,
		maxRecord : 85,
		
		fixed : 10,
		minMode : 1850,
		calculatePrize : Env.defaultCalculate,
		pageHtml : '<dl class="danqiu" id="exzhixfsh"><dd><h5>十位</h5>'
			+ '<ul class="sz-qiu"><li  id="exzhixfsh_s_0">0</li><li id="exzhixfsh_s_1">1</li><li id="exzhixfsh_s_2">2</li>'
			+'<li id="exzhixfsh_s_3">3</li><li id="exzhixfsh_s_4">4</li><li id="exzhixfsh_s_5">5</li><li id="exzhixfsh_s_6">6</li>'
			+'<li id="exzhixfsh_s_7">7</li><li id="exzhixfsh_s_8">8</li><li id="exzhixfsh_s_9">9</li></ul>'
			+ '<ul class="gongn"><li datascope="exzhixfsh_s_ful_0-9">全</li><li datascope="exzhixfsh_s_big_0-9">大</li><li datascope="exzhixfsh_s_sma_0-9">小</li>'
			+'<li datascope="exzhixfsh_s_sin_0-9">单</li><li datascope="exzhixfsh_s_dou_0-9">双</li><li datascope="exzhixfsh_s_cle_0-9">清</li></ul></dd>'
			+ '<dd><h5>个位</h5>'
			+ '<ul class="sz-qiu"><li  id="exzhixfsh_g_0">0</li><li id="exzhixfsh_g_1">1</li><li id="exzhixfsh_g_2">2</li>'
			+'<li id="exzhixfsh_g_3">3</li><li id="exzhixfsh_g_4">4</li><li id="exzhixfsh_g_5">5</li><li id="exzhixfsh_g_6">6</li>'
			+'<li id="exzhixfsh_g_7">7</li><li id="exzhixfsh_g_8">8</li><li id="exzhixfsh_g_9">9</li></ul>'
			+ '<ul class="gongn"><li datascope="exzhixfsh_g_ful_0-9">全</li><li datascope="exzhixfsh_g_big_0-9">大</li><li datascope="exzhixfsh_g_sma_0-9">小</li>'
			+'<li datascope="exzhixfsh_g_sin_0-9">单</li><li datascope="exzhixfsh_g_dou_0-9">双</li><li datascope="exzhixfsh_g_cle_0-9">清</li></ul></dd></dl>',
		bettips : '从十、个位各选一个号码组成一注。',
		betexample : '投注方案：***23；开奖号码：***23',
		bethelp : '玩法：从十位、个位中选择一个2位数号码组成一注，所选号码与开奖号码全部相同，且顺序一致，即为中奖。',
		formatBalls : function(balls) {
			return formatBall(balls['s'])+','+formatBall(balls['g']);
		},
		vali : function() {
			if (!way.get(this.rulecode + ".count.s")
					|| !way.get(this.rulecode + ".count.g")) {
				way.set("Lottery.itemcount", "0");
				way.set("Lottery.total", "0");
			} else if (way.get("Lottery.times")) {
				var itemcount = way.get(this.rulecode + ".count.s")
						* way.get(this.rulecode + ".count.g");
				way.set("Lottery.itemcount", ""+itemcount);
				var total = itemcount * way.get("Lottery.times")
						* way.get("http://www.yugj881.com/resources/main/lottery/Lottery.yjf") * Env.price;
				if (total)
					way.set("Lottery.total", total.toFixed(4));
				else
					way.set("Lottery.total", "0");
			} else {
				way.set("Lottery.total", "0");
			}
		},
		clear : function() {
			var ss = [ "s", "g" ];
			for (k = 0; k < 2; k++)
				for (i = 0; i <= 9; i++) {
					var item = $("#exzhixfsh_" + ss[k] + "_" + i);
					if (item.hasClass("cur")) {
						item.trigger('click');
					}
				}
		}
	},
	"exzhixdsh" : {
		showname : '单式',
		rulecode : 'exzhixdsh',
		realname : '[后二星_单式]',
		maxMultiplePerOrder : -1,
		maxPrize : -1,
		maxRecord : 85,
		
		fixed : 10,
		minMode : 1850,
		calculatePrize : Env.defaultCalculate,
		bettips : '手动输入号码，至少输入1个二位数号码组成一注。',
		betexample : '投注方案：***23； 开奖号码：***23，即中后二星直选一等奖',
		bethelp : '玩法：手动输入一个2位数号码组成一注，所选号码的十位、个位与开奖号码相同，且顺序一致，即为中奖。',
		textarea : {},
		vali : function(k) {
			var itemcount = 0;
			if (way.get("Lottery.context")) {
				var v = way.get("Lottery.context");
				var reg = /\b[0-9]{2}\b/g;
				// 去重复
				var sszz = util_unique(v, reg);
				sszz = sszz.sort();
				if (sszz) {
					itemcount = sszz.length;
					way.set("Lottery.contexts", sszz);
				}
			}
			if (way.get("Lottery.times")) {
				if (itemcount)
					way.set("Lottery.itemcount", ""+itemcount);
				else
					way.set("Lottery.itemcount", "0");
				var total = itemcount * way.get("Lottery.times")
						* way.get("http://www.yugj881.com/resources/main/lottery/Lottery.yjf") * Env.price;
				if (total)
					way.set("Lottery.total", total.toFixed(4));
				else
					way.set("Lottery.total", "0");
			} else {
				way.set("Lottery.itemcount", "0");
				way.set("Lottery.total", "0");
			}
		},
		changeContext : function(e) {
			var k = String.fromCharCode(e.which);
			if (isNaN(parseInt(k))) {
				if (k != ' ' && k != ',' && k != ';')
					e.returnValue = false;
			}
		},
		clear : function() {
			way.set("Lottery.context", "");
		}
	},
	"exzuxfsh" : {
		showname : '组选复式',
		rulecode : 'exzuxfsh',
		realname : '[后二星_组选复式]',
		maxMultiplePerOrder : -1,
		maxPrize : -1,
		maxRecord : -1,
		
		fixed : 20,
		minMode : 1850,
		calculatePrize : Env.defaultCalculate,
		pageHtml :'<dl class="danqiu" id="exzuxfsh"><dd><h5>后二组选</h5>'
			+ '<ul class="sz-qiu"><li  id="exzuxfsh_zu_0">0</li><li id="exzuxfsh_zu_1">1</li><li id="exzuxfsh_zu_2">2</li>'
			+'<li id="exzuxfsh_zu_3">3</li><li id="exzuxfsh_zu_4">4</li><li id="exzuxfsh_zu_5">5</li><li id="exzuxfsh_zu_6">6</li>'
			+'<li id="exzuxfsh_zu_7">7</li><li id="exzuxfsh_zu_8">8</li><li id="exzuxfsh_zu_9">9</li></ul>'
			+ '<ul class="gongn"><li datascope="exzuxfsh_zu_ful_0-9">全</li><li datascope="exzuxfsh_zu_big_0-9">大</li><li datascope="exzuxfsh_zu_sma_0-9">小</li>'
			+'<li datascope="exzuxfsh_zu_sin_0-9">单</li><li datascope="exzuxfsh_zu_dou_0-9">双</li><li datascope="exzuxfsh_zu_cle_0-9">清</li></ul></dd></dl>',
		bettips : '至少选择两个号码组成一注。',
		betexample : '投注方案：选择12（展开为***12，***21）,开奖为***12 或 ***21，即为中奖。',
		bethelp : '玩法：后二组选复式：从0-9中选2个或多个号码对十位和个位投注，顺序不限，即为中奖',
		vali : function() {
			if (!way.get(this.rulecode + ".count.zu")
					|| way.get(this.rulecode + ".count.zu") < 2) {
				way.set("Lottery.itemcount", "0");
				way.set("Lottery.total", "0");
			} else if (way.get("Lottery.times")) {
				var itemcount = way.get(this.rulecode + ".count.zu");
				itemcount = itemcount * (itemcount - 1) / 2;
				way.set("Lottery.itemcount", ""+itemcount);
				var total = itemcount * way.get("Lottery.times")
						* way.get("http://www.yugj881.com/resources/main/lottery/Lottery.yjf") * Env.price;
				if (total)
					way.set("Lottery.total", total.toFixed(4));
				else
					way.set("Lottery.total", "0");
			} else {
				way.set("Lottery.total", "0");
			}
		},
		clear : function() {
			var ss = [ "zu" ];
			for (k = 0; k < 1; k++)
				for (i = 0; i <= 9; i++) {
					var item = $("#exzuxfsh_" + ss[k] + "_" + i);
					if (item.hasClass("cur")) {
						item.trigger('click');
					}
				}
		}
	},
	"exzuxdsh" : {
		showname : '组选单式',
		rulecode : 'exzuxdsh',
		realname : '[后二星_组选单式]',
		maxMultiplePerOrder : -1,
		maxPrize : -1,
		maxRecord : -1,
		fixed : 20,
		minMode : 1850,
		calculatePrize : Env.defaultCalculate,
		bettips : '手动输入号码，至少输入1个二位数号码组成一注。',
		betexample : '投注方案：手动输入12，开奖号码为***12 或 ***21 即为中奖',
		bethelp : '玩法：后二组选单式：键盘手动输入购买号码，2个数字为一注，与开奖号码的十位、个位符合且顺序不限，即为中奖。',
		textarea : {},
		vali : function(k) {
			var itemcount = 0;
			if (way.get("Lottery.context")) {
				var v = way.get("Lottery.context");
				var reg = /\b([0-9])(?!\1)([0-9])\b/g;
				// 去重复
				var sszz = util_unique(v, reg, 1, true);
				sszz = sszz.sort();
				if (sszz) {
					itemcount = sszz.length;
					way.set("Lottery.contexts", sszz);
				}
			}
			if (way.get("Lottery.times")) {
				if (itemcount)
					way.set("Lottery.itemcount", ""+itemcount);
				else
					way.set("Lottery.itemcount", "0");
				var total = itemcount * way.get("Lottery.times")
						* way.get("http://www.yugj881.com/resources/main/lottery/Lottery.yjf") * Env.price;
				if (total)
					way.set("Lottery.total", total.toFixed(4));
				else
					way.set("Lottery.total", "0");
			} else {
				way.set("Lottery.itemcount", "0");
				way.set("Lottery.total", "0");
			}
		},
		changeContext : function(e) {
			var k = String.fromCharCode(e.which);
			if (isNaN(parseInt(k))) {
				if (k != ' ' && k != ',' && k != ';')
					e.returnValue = false;
			}
		},
		clear : function() {
			way.set("Lottery.context", "");
		}
	},
	"bdwqs" : {
		showname : '前三不定位',
		rulecode : 'bdwqs',
		realname : '[不定位_前三不定位]',
		maxMultiplePerOrder : -1,
		maxPrize : -1,
		maxRecord : -1,
		
		minMode : 1850,
		startPrice : 6.6,
		calculatePrize : Env.defaultCalculate,
		pageHtml :'<dl class="danqiu" id="bdwqs"><dd><h5>前三一码</h5>'
			+ '<ul class="sz-qiu"><li  id="bdwqs_zu_0">0</li><li id="bdwqs_zu_1">1</li><li id="bdwqs_zu_2">2</li>'
			+'<li id="bdwqs_zu_3">3</li><li id="bdwqs_zu_4">4</li><li id="bdwqs_zu_5">5</li><li id="bdwqs_zu_6">6</li>'
			+'<li id="bdwqs_zu_7">7</li><li id="bdwqs_zu_8">8</li><li id="bdwqs_zu_9">9</li></ul>'
			+ '<ul class="gongn"><li datascope="bdwqs_zu_ful_0-9">全</li><li datascope="bdwqs_zu_big_0-9">大</li><li datascope="bdwqs_zu_sma_0-9">小</li>'
			+'<li datascope="bdwqs_zu_sin_0-9">单</li><li datascope="bdwqs_zu_dou_0-9">双</li><li datascope="bdwqs_zu_cle_0-9">清</li></ul></dd></dl>',
		bettips : '至少选择一个号码组成一注。',
		betexample : '投注方案：选择不定位1，开出1****、*1***、**1**即为中奖。',
		bethelp : '玩法：从0-9中选择1个号码，每注由1个号码组成，只要开奖号码的万位、千位、百位中包含所选号码，即为中奖。',
		vali : function() {
			if (!way.get(this.rulecode + ".count.zu")) {
				way.set("Lottery.itemcount", "0");
				way.set("Lottery.total", "0");
			} else if (way.get("Lottery.times")) {
				var itemcount = way.get(this.rulecode + ".count.zu");
				way.set("Lottery.itemcount", ""+itemcount);
				var total = itemcount * way.get("Lottery.times")
						* way.get("http://www.yugj881.com/resources/main/lottery/Lottery.yjf") * Env.price;
				if (total)
					way.set("Lottery.total", total.toFixed(4));
				else
					way.set("Lottery.total", "0");
			} else {
				way.set("Lottery.total", "0");
			}
		},
		clear : function() {
			var ss = [ "zu" ];
			for (k = 0; k < 1; k++)
				for (i = 0; i <= 9; i++) {
					var item = $("#bdwqs_" + ss[k] + "_" + i);
					if (item.hasClass("cur")) {
						item.trigger('click');
					}
				}
		}
	},
	"bdwzs" : {
		showname : '中三不定位',
		rulecode : 'bdwzs',
		realname : '[不定位_中三不定位]',
		maxMultiplePerOrder : -1,
		maxPrize : -1,
		maxRecord : -1,
		
		minMode : 1850,
		startPrice : 6.6,
		calculatePrize : Env.defaultCalculate,
		pageHtml :'<dl class="danqiu" id="bdwzs"><dd><h5>中三一码</h5>'
			+ '<ul class="sz-qiu"><li  id="bdwzs_zu_0">0</li><li id="bdwzs_zu_1">1</li><li id="bdwzs_zu_2">2</li>'
			+'<li id="bdwzs_zu_3">3</li><li id="bdwzs_zu_4">4</li><li id="bdwzs_zu_5">5</li><li id="bdwzs_zu_6">6</li>'
			+'<li id="bdwzs_zu_7">7</li><li id="bdwzs_zu_8">8</li><li id="bdwzs_zu_9">9</li></ul>'
			+ '<ul class="gongn"><li datascope="bdwzs_zu_ful_0-9">全</li><li datascope="bdwzs_zu_big_0-9">大</li><li datascope="bdwzs_zu_sma_0-9">小</li>'
			+'<li datascope="bdwzs_zu_sin_0-9">单</li><li datascope="bdwzs_zu_dou_0-9">双</li><li datascope="bdwzs_zu_cle_0-9">清</li></ul></dd></dl>',
		bettips : '至少选择一个号码组成一注。',
		betexample : '投注方案：选择不定位1，开出*1***、**1**、***1*即为中奖。',
		bethelp : '玩法：从0-9中选择1个号码，每注由1个号码组成，只要开奖号码的千位、百位、十位中包含所选号码，即为中奖。',
		vali : function() {
			if (!way.get(this.rulecode + ".count.zu")) {
				way.set("Lottery.itemcount", "0");
				way.set("Lottery.total", "0");
			} else if (way.get("Lottery.times")) {
				var itemcount = way.get(this.rulecode + ".count.zu");
				way.set("Lottery.itemcount", ""+itemcount);
				var total = itemcount * way.get("Lottery.times")
						* way.get("http://www.yugj881.com/resources/main/lottery/Lottery.yjf") * Env.price;
				if (total)
					way.set("Lottery.total", total.toFixed(4));
				else
					way.set("Lottery.total", "0");
			} else {
				way.set("Lottery.total", "0");
			}
		},
		clear : function() {
			var ss = [ "zu" ];
			for (k = 0; k < 1; k++)
				for (i = 0; i <= 9; i++) {
					var item = $("#bdwzs_" + ss[k] + "_" + i);
					if (item.hasClass("cur")) {
						item.trigger('click');
					}
				}
		}
	},
	"bdwhs" : {
		showname : '后三不定位',
		rulecode : 'bdwhs',
		realname : '[不定位_后三不定位]',
		maxMultiplePerOrder : -1,
		maxPrize : -1,
		maxRecord : -1,
		
		minMode : 1850,
		startPrice : 6.6,
		calculatePrize : Env.defaultCalculate,
		pageHtml :'<dl class="danqiu" id="bdwhs"><dd><h5>后三一码</h5>'
			+ '<ul class="sz-qiu"><li  id="bdwhs_zu_0">0</li><li id="bdwhs_zu_1">1</li><li id="bdwhs_zu_2">2</li>'
			+'<li id="bdwhs_zu_3">3</li><li id="bdwhs_zu_4">4</li><li id="bdwhs_zu_5">5</li><li id="bdwhs_zu_6">6</li>'
			+'<li id="bdwhs_zu_7">7</li><li id="bdwhs_zu_8">8</li><li id="bdwhs_zu_9">9</li></ul>'
			+ '<ul class="gongn"><li datascope="bdwhs_zu_ful_0-9">全</li><li datascope="bdwhs_zu_big_0-9">大</li><li datascope="bdwhs_zu_sma_0-9">小</li>'
			+'<li datascope="bdwhs_zu_sin_0-9">单</li><li datascope="bdwhs_zu_dou_0-9">双</li><li datascope="bdwhs_zu_cle_0-9">清</li></ul></dd></dl>',
		bettips : '至少选择一个号码组成一注。',
		betexample : '投注方案：选择不定位1，开出****1、***1*、**1**即为中奖。',
		bethelp : '玩法：从0-9中选择1个号码，每注由1个号码组成，只要开奖号码的百位、十位、个位中包含所选号码，即为中奖。',
		vali : function() {
			if (!way.get(this.rulecode + ".count.zu")) {
				way.set("Lottery.itemcount", "0");
				way.set("Lottery.total", "0");
			} else if (way.get("Lottery.times")) {
				var itemcount = way.get(this.rulecode + ".count.zu");
				way.set("Lottery.itemcount", ""+itemcount);
				var total = itemcount * way.get("Lottery.times")
						* way.get("http://www.yugj881.com/resources/main/lottery/Lottery.yjf") * Env.price;
				if (total)
					way.set("Lottery.total", total.toFixed(4));
				else
					way.set("Lottery.total", "0");
			} else {
				way.set("Lottery.total", "0");
			}
		},
		clear : function() {
			var ss = [ "zu" ];
			for (k = 0; k < 1; k++)
				for (i = 0; i <= 9; i++) {
					var item = $("#bdwhs_" + ss[k] + "_" + i);
					if (item.hasClass("cur")) {
						item.trigger('click');
					}
				}
		}
	},
	"bdw5x1m" : {
		showname : '五星一码',
		rulecode : 'bdw5x1m',
		realname : '[不定位_五星一码]',
		maxMultiplePerOrder : -1,
		maxPrize : -1,
		maxRecord : -1,
		
		minMode : 1850,
		startPrice : 4.72,
		calculatePrize : Env.defaultCalculate,
		pageHtml :'<dl class="danqiu" id="bdw5x1m"><dd><h5>五星一码</h5>'
			+ '<ul class="sz-qiu"><li  id="bdw5x1m_zu_0">0</li><li id="bdw5x1m_zu_1">1</li><li id="bdw5x1m_zu_2">2</li>'
			+'<li id="bdw5x1m_zu_3">3</li><li id="bdw5x1m_zu_4">4</li><li id="bdw5x1m_zu_5">5</li><li id="bdw5x1m_zu_6">6</li>'
			+'<li id="bdw5x1m_zu_7">7</li><li id="bdw5x1m_zu_8">8</li><li id="bdw5x1m_zu_9">9</li></ul>'
			+ '<ul class="gongn"><li datascope="bdw5x1m_zu_ful_0-9">全</li><li datascope="bdw5x1m_zu_big_0-9">大</li><li datascope="bdw5x1m_zu_sma_0-9">小</li>'
			+'<li datascope="bdw5x1m_zu_sin_0-9">单</li><li datascope="bdw5x1m_zu_dou_0-9">双</li><li datascope="bdw5x1m_zu_cle_0-9">清</li></ul></dd></dl>',
		bettips : '至少选择一个号码组成一注。',
		betexample : '投注方案：例如投注3，开奖号34535，中一注。（出现一次和出现两次都只算中一注）',
		bethelp : '玩法：每注号码由一个数字组成，只要开奖号码任意一位出现了投注的号码，即为中奖。',
		vali : function() {
			if (!way.get(this.rulecode + ".count.zu")) {
				way.set("Lottery.itemcount", "0");
				way.set("Lottery.total", "0");
			} else if (way.get("Lottery.times")) {
				var itemcount = way.get(this.rulecode + ".count.zu");
				way.set("Lottery.itemcount", ""+itemcount);
				var total = itemcount * way.get("Lottery.times")
						* way.get("http://www.yugj881.com/resources/main/lottery/Lottery.yjf") * Env.price;
				if (total)
					way.set("Lottery.total", total.toFixed(4));
				else
					way.set("Lottery.total", "0");
			} else {
				way.set("Lottery.total", "0");
			}
		},
		clear : function() {
			var ss = [ "zu" ];
			for (k = 0; k < 1; k++)
				for (i = 0; i <= 9; i++) {
					var item = $("#bdw5x1m_" + ss[k] + "_" + i);
					if (item.hasClass("cur")) {
						item.trigger('click');
					}
				}
		}
	},
	"qwyffs" : {
		showname : '一帆风顺',
		rulecode : 'qwyffs',
		realname : '[趣味_一帆风顺]',
		maxMultiplePerOrder : -1,
		maxPrize : -1,
		maxRecord : -1,
		
		minMode : 1850,
		startPrice : 4.72,
		calculatePrize : Env.defaultCalculate,
		pageHtml :'<dl class="danqiu" id="qwyffs"><dd><h5>一帆风顺</h5>'
			+ '<ul class="sz-qiu"><li  id="qwyffs_zu_0">0</li><li id="qwyffs_zu_1">1</li><li id="qwyffs_zu_2">2</li>'
			+'<li id="qwyffs_zu_3">3</li><li id="qwyffs_zu_4">4</li><li id="qwyffs_zu_5">5</li><li id="qwyffs_zu_6">6</li>'
			+'<li id="qwyffs_zu_7">7</li><li id="qwyffs_zu_8">8</li><li id="qwyffs_zu_9">9</li></ul>'
			+ '<ul class="gongn"><li datascope="qwyffs_zu_ful_0-9">全</li><li datascope="qwyffs_zu_big_0-9">大</li><li datascope="qwyffs_zu_sma_0-9">小</li>'
			+'<li datascope="qwyffs_zu_sin_0-9">单</li><li datascope="qwyffs_zu_dou_0-9">双</li><li datascope="qwyffs_zu_cle_0-9">清</li></ul></dd></dl>',
		bettips : '从0-9中任意选择1个以上号码。',
		betexample : '投注方案：例如投注3，开奖号34535，中一注。（出现一次和出现两次都只算中一注）',
		bethelp : '玩法：每注号码由一个数字组成，只要开奖号码任意一位出现了投注的号码，即为中奖。',
		vali : function() {
			if (!way.get(this.rulecode + ".count.zu")) {
				way.set("Lottery.itemcount", "0");
				way.set("Lottery.total", "0");
			} else if (way.get("Lottery.times")) {
				var itemcount = way.get(this.rulecode + ".count.zu");
				way.set("Lottery.itemcount", ""+itemcount);
				var total = itemcount * way.get("Lottery.times")
						* way.get("http://www.yugj881.com/resources/main/lottery/Lottery.yjf") * Env.price;
				if (total)
					way.set("Lottery.total", total.toFixed(4));
				else
					way.set("Lottery.total", "0");
			} else {
				way.set("Lottery.total", "0");
			}
		},
		clear : function() {
			var ss = [ "zu" ];
			for (k = 0; k < 1; k++)
				for (i = 0; i <= 9; i++) {
					var item = $("#qwyffs_" + ss[k] + "_" + i);
					if (item.hasClass("cur")) {
						item.trigger('click');
					}
				}
		}
	},
	"qwhscs" : {
		showname : '好事成双',
		rulecode : 'qwhscs',
		realname : '[趣味_好事成双]',
		maxMultiplePerOrder : -1,
		maxPrize : -1,
		maxRecord : -1,
		
		minMode : 1850,
		startPrice : 20.872,
		calculatePrize : Env.defaultCalculate,
		pageHtml :'<dl class="danqiu" id="qwhscs"><dd><h5>好事成双</h5>'
			+ '<ul class="sz-qiu"><li  id="qwhscs_zu_0">0</li><li id="qwhscs_zu_1">1</li><li id="qwhscs_zu_2">2</li>'
			+'<li id="qwhscs_zu_3">3</li><li id="qwhscs_zu_4">4</li><li id="qwhscs_zu_5">5</li><li id="qwhscs_zu_6">6</li>'
			+'<li id="qwhscs_zu_7">7</li><li id="qwhscs_zu_8">8</li><li id="qwhscs_zu_9">9</li></ul>'
			+ '<ul class="gongn"><li datascope="qwhscs_zu_ful_0-9">全</li><li datascope="qwhscs_zu_big_0-9">大</li><li datascope="qwhscs_zu_sma_0-9">小</li>'
			+'<li datascope="qwhscs_zu_sin_0-9">单</li><li datascope="qwhscs_zu_dou_0-9">双</li><li datascope="qwhscs_zu_cle_0-9">清</li></ul></dd></dl>',
		bettips : '从0-9中任意选择1个以上的二重号码。',
		betexample : '投注方案：例如投注3，开奖号34573，中一注。',
		bethelp : '玩法：从0-9中任意一个号码组成一注，只要所选号码在开奖号码任意一位出现了2次，即为中奖。',
		vali : function() {
			if (!way.get(this.rulecode + ".count.zu")) {
				way.set("Lottery.itemcount", "0");
				way.set("Lottery.total", "0");
			} else if (way.get("Lottery.times")) {
				var itemcount = way.get(this.rulecode + ".count.zu");
				way.set("Lottery.itemcount", ""+itemcount);
				var total = itemcount * way.get("Lottery.times")
						* way.get("http://www.yugj881.com/resources/main/lottery/Lottery.yjf") * Env.price;
				if (total)
					way.set("Lottery.total", total.toFixed(4));
				else
					way.set("Lottery.total", "0");
			} else {
				way.set("Lottery.total", "0");
			}
		},
		clear : function() {
			var ss = [ "zu" ];
			for (k = 0; k < 1; k++)
				for (i = 0; i <= 9; i++) {
					var item = $("#qwhscs_" + ss[k] + "_" + i);
					if (item.hasClass("cur")) {
						item.trigger('click');
					}
				}
		}
	},
	"qwsxbx" : {
		showname : '三星报喜',
		rulecode : 'qwsxbx',
		realname : '[趣味_三星报喜]',
		maxMultiplePerOrder : -1,
		maxPrize : -1,
		maxRecord : -1,
		
		minMode : 1850,
		startPrice : 198.598,
		calculatePrize : Env.defaultCalculate,
		pageHtml :'<dl class="danqiu" id="qwsxbx"><dd><h5>三星报喜</h5>'
			+ '<ul class="sz-qiu"><li  id="qwsxbx_zu_0">0</li><li id="qwsxbx_zu_1">1</li><li id="qwsxbx_zu_2">2</li>'
			+'<li id="qwsxbx_zu_3">3</li><li id="qwsxbx_zu_4">4</li><li id="qwsxbx_zu_5">5</li><li id="qwsxbx_zu_6">6</li>'
			+'<li id="qwsxbx_zu_7">7</li><li id="qwsxbx_zu_8">8</li><li id="qwsxbx_zu_9">9</li></ul>'
			+ '<ul class="gongn"><li datascope="qwsxbx_zu_ful_0-9">全</li><li datascope="qwsxbx_zu_big_0-9">大</li><li datascope="qwsxbx_zu_sma_0-9">小</li>'
			+'<li datascope="qwsxbx_zu_sin_0-9">单</li><li datascope="qwsxbx_zu_dou_0-9">双</li><li datascope="qwsxbx_zu_cle_0-9">清</li></ul></dd></dl>',
		bettips : '从0-9中任意选择1个以上的三重号码。',
		betexample : '投注方案：例如投注3，开奖号34373，中一注。',
		bethelp : '玩法：从0-9中任意一个号码组成一注，只要所选号码在开奖号码任意一位出现了3次，即为中奖。',
		vali : function() {
			if (!way.get(this.rulecode + ".count.zu")) {
				way.set("Lottery.itemcount", "0");
				way.set("Lottery.total", "0");
			} else if (way.get("Lottery.times")) {
				var itemcount = way.get(this.rulecode + ".count.zu");
				way.set("Lottery.itemcount", ""+itemcount);
				var total = itemcount * way.get("Lottery.times")
						* way.get("http://www.yugj881.com/resources/main/lottery/Lottery.yjf") * Env.price;
				if (total)
					way.set("Lottery.total", total.toFixed(4));
				else
					way.set("Lottery.total", "0");
			} else {
				way.set("Lottery.total", "0");
			}
		},
		clear : function() {
			var ss = [ "zu" ];
			for (k = 0; k < 1; k++)
				for (i = 0; i <= 9; i++) {
					var item = $("#qwsxbx_" + ss[k] + "_" + i);
					if (item.hasClass("cur")) {
						item.trigger('click');
					}
				}
		}
	},
	"qwsjfc" : {
		showname : '四季发财',
		rulecode : 'qwsjfc',
		realname : '[趣味_四季发财]',
		maxMultiplePerOrder : -1,
		maxPrize : -1,
		maxRecord : -1,
		
		minMode : 1850,
		startPrice : 3695.652,
		calculatePrize : Env.defaultCalculate,
		pageHtml :'<dl class="danqiu" id="qwsjfc"><dd><h5>四季发财</h5>'
			+ '<ul class="sz-qiu"><li  id="qwsjfc_zu_0">0</li><li id="qwsjfc_zu_1">1</li><li id="qwsjfc_zu_2">2</li>'
			+'<li id="qwsjfc_zu_3">3</li><li id="qwsjfc_zu_4">4</li><li id="qwsjfc_zu_5">5</li><li id="qwsjfc_zu_6">6</li>'
			+'<li id="qwsjfc_zu_7">7</li><li id="qwsjfc_zu_8">8</li><li id="qwsjfc_zu_9">9</li></ul>'
			+ '<ul class="gongn"><li datascope="qwsjfc_zu_ful_0-9">全</li><li datascope="qwsjfc_zu_big_0-9">大</li><li datascope="qwsjfc_zu_sma_0-9">小</li>'
			+'<li datascope="qwsjfc_zu_sin_0-9">单</li><li datascope="qwsjfc_zu_dou_0-9">双</li><li datascope="qwsjfc_zu_cle_0-9">清</li></ul></dd></dl>',
		bettips : '从0-9中任意选择1个以上的四重号码。',
		betexample : '投注方案：例如投注3，开奖号34333，中一注。',
		bethelp : '玩法：从0-9中任意一个号码组成一注，只要所选号码在开奖号码任意一位出现了4次，即为中奖。',
		vali : function() {
			if (!way.get(this.rulecode + ".count.zu")) {
				way.set("Lottery.itemcount", "0");
				way.set("Lottery.total", "0");
			} else if (way.get("Lottery.times")) {
				var itemcount = way.get(this.rulecode + ".count.zu");
				way.set("Lottery.itemcount", ""+itemcount);
				var total = itemcount * way.get("Lottery.times")
						* way.get("http://www.yugj881.com/resources/main/lottery/Lottery.yjf") * Env.price;
				if (total)
					way.set("Lottery.total", total.toFixed(4));
				else
					way.set("Lottery.total", "0");
			} else {
				way.set("Lottery.total", "0");
			}
		},
		clear : function() {
			var ss = [ "zu" ];
			for (k = 0; k < 1; k++)
				for (i = 0; i <= 9; i++) {
					var item = $("#qwsjfc_" + ss[k] + "_" + i);
					if (item.hasClass("cur")) {
						item.trigger('click');
					}
				}
		}
	},
	"bdw5x2m" : {
		showname : '五星二码',
		rulecode : 'bdw5x2m',
		realname : '[不定位_五星二码]',
		maxMultiplePerOrder : -1,
		maxPrize : -1,
		maxRecord : -1,
		
		minMode : 1850,
		startPrice : 13.18,
		calculatePrize : Env.defaultCalculate,
		pageHtml :'<dl class="danqiu" id="bdw5x2m"><dd><h5>五星二码</h5>'
			+ '<ul class="sz-qiu"><li  id="bdw5x2m_zu_0">0</li><li id="bdw5x2m_zu_1">1</li><li id="bdw5x2m_zu_2">2</li>'
			+'<li id="bdw5x2m_zu_3">3</li><li id="bdw5x2m_zu_4">4</li><li id="bdw5x2m_zu_5">5</li><li id="bdw5x2m_zu_6">6</li>'
			+'<li id="bdw5x2m_zu_7">7</li><li id="bdw5x2m_zu_8">8</li><li id="bdw5x2m_zu_9">9</li></ul>'
			+ '<ul class="gongn"><li datascope="bdw5x2m_zu_ful_0-9">全</li><li datascope="bdw5x2m_zu_big_0-9">大</li><li datascope="bdw5x2m_zu_sma_0-9">小</li>'
			+'<li datascope="bdw5x2m_zu_sin_0-9">单</li><li datascope="bdw5x2m_zu_dou_0-9">双</li><li datascope="bdw5x2m_zu_cle_0-9">清</li></ul></dd></dl>',
		bettips : '至少选择两个号码组成一注。',
		betexample : '投注方案：例如投注36，开奖号码32468，中一注。',
		bethelp : '玩法：每注号码由两个数字组成，只要开奖号码包含投注号码即为中奖。',
		vali : function() {
			if (!way.get(this.rulecode + ".count.zu")) {
				way.set("Lottery.itemcount", "0");
				way.set("Lottery.total", "0");
			} else if (way.get("Lottery.times")) {
				var itemcount = way.get(this.rulecode + ".count.zu");
				if (itemcount >= 2) {
					itemcount = itemcount * (itemcount - 1) / 2;
				} else {
					itemcount = 0;
				}

				way.set("Lottery.itemcount", ""+itemcount);
				var total = itemcount * way.get("Lottery.times")
						* way.get("http://www.yugj881.com/resources/main/lottery/Lottery.yjf") * Env.price;
				if (total)
					way.set("Lottery.total", total.toFixed(4));
				else
					way.set("Lottery.total", "0");
			} else {
				way.set("Lottery.total", "0");
			}
		},
		clear : function() {
			var ss = [ "zu" ];
			for (k = 0; k < 1; k++)
				for (i = 0; i <= 9; i++) {
					var item = $("#bdw5x2m_" + ss[k] + "_" + i);
					if (item.hasClass("cur")) {
						item.trigger('click');
					}
				}
		}
	},
	"bdw5x3m" : {
		showname : '五星三码',
		rulecode : 'bdw5x3m',
		realname : '[不定位_五星三码]',
		maxMultiplePerOrder : -1,
		maxPrize : -1,
		maxRecord : -1,
		
		minMode : 1850,
		startPrice : 44.58,
		calculatePrize : Env.defaultCalculate,
		pageHtml :'<dl class="danqiu" id="bdw5x3m"><dd><h5>五星三码</h5>'
			+ '<ul class="sz-qiu"><li  id="bdw5x3m_zu_0">0</li><li id="bdw5x3m_zu_1">1</li><li id="bdw5x3m_zu_2">2</li>'
			+'<li id="bdw5x3m_zu_3">3</li><li id="bdw5x3m_zu_4">4</li><li id="bdw5x3m_zu_5">5</li><li id="bdw5x3m_zu_6">6</li>'
			+'<li id="bdw5x3m_zu_7">7</li><li id="bdw5x3m_zu_8">8</li><li id="bdw5x3m_zu_9">9</li></ul>'
			+ '<ul class="gongn"><li datascope="bdw5x3m_zu_ful_0-9">全</li><li datascope="bdw5x3m_zu_big_0-9">大</li><li datascope="bdw5x3m_zu_sma_0-9">小</li>'
			+'<li datascope="bdw5x3m_zu_sin_0-9">单</li><li datascope="bdw5x3m_zu_dou_0-9">双</li><li datascope="bdw5x3m_zu_cle_0-9">清</li></ul></dd></dl>',
		bettips : '至少选择三个号码组成一注。',
		betexample : '投注方案：例如投注368，开奖号码32468，中一注。',
		bethelp : '玩法：每注号码由三个数字组成，只要开奖号码中包含投注号码即中奖。',
		vali : function() {
			if (!way.get(this.rulecode + ".count.zu")) {
				way.set("Lottery.itemcount", "0");
				way.set("Lottery.total", "0");
			} else if (way.get("Lottery.times")) {
				var itemcount = way.get(this.rulecode + ".count.zu");
				if (itemcount >= 3) {
					itemcount = itemcount * (itemcount - 1) * (itemcount - 2)/6;
				} else {
					itemcount = 0;
				}

				way.set("Lottery.itemcount", ""+itemcount);
				var total = itemcount * way.get("Lottery.times")
						* way.get("http://www.yugj881.com/resources/main/lottery/Lottery.yjf") * Env.price;
				if (total)
					way.set("Lottery.total", total.toFixed(4));
				else
					way.set("Lottery.total", "0");
			} else {
				way.set("Lottery.total", "0");
			}
		},
		clear : function() {
			var ss = [ "zu" ];
			for (k = 0; k < 1; k++)
				for (i = 0; i <= 9; i++) {
					var item = $("#bdw5x3m_" + ss[k] + "_" + i);
					if (item.hasClass("cur")) {
						item.trigger('click');
					}
				}
		}
	},
	"bdw2mjc" : {
		showname : '二码计重',
		rulecode : 'bdw2mjc',
		realname : '[不定位_二码计重]',
		maxMultiplePerOrder : -1,
		maxPrize : -1,
		maxRecord : -1,
		
		minMode : 1850,
		startPrice : 7.36,
		calculatePrize : Env.defaultCalculate,
		pageHtml :'<dl class="danqiu" id="bdw2mjc"><dd><h5>二码计重</h5>'
			+ '<ul class="sz-qiu"><li id="bdw2mjc_zu_0">0</li><li id="bdw2mjc_zu_1">1</li><li id="bdw2mjc_zu_2">2</li>'
			+'<li id="bdw2mjc_zu_3">3</li><li id="bdw2mjc_zu_4">4</li><li id="bdw2mjc_zu_5">5</li><li id="bdw2mjc_zu_6">6</li>'
			+'<li id="bdw2mjc_zu_7">7</li><li id="bdw2mjc_zu_8">8</li><li id="bdw2mjc_zu_9">9</li></ul>'
			+ '<ul class="gongn"><li datascope="bdw2mjc_zu_ful_0-9">全</li><li datascope="bdw2mjc_zu_big_0-9">大</li><li datascope="bdw2mjc_zu_sma_0-9">小</li>'
			+'<li datascope="bdw2mjc_zu_sin_0-9">单</li><li datascope="bdw2mjc_zu_dou_0-9">双</li><li datascope="bdw2mjc_zu_cle_0-9">清</li></ul></dd></dl>',
		bettips : '至少选择两个号码组成一注。',
		betexample : '投注方案：每注号码由两个数字组成，例如投注23，只要开奖号码中2出现的次数加3出现的次数大于等于2，即中奖，即使只出现了2，没有出现3，也中奖。',
		bethelp : '玩法：每注号码由两个数字组成。',
		vali : function() {
			if (!way.get(this.rulecode + ".count.zu")) {
				way.set("Lottery.itemcount", "0");
				way.set("Lottery.total", "0");
			} else if (way.get("Lottery.times")) {
				var itemcount = way.get(this.rulecode + ".count.zu");
				if (itemcount >= 2) {
					itemcount = itemcount * (itemcount - 1) / 2;
				} else {
					itemcount = 0;
				}

				way.set("Lottery.itemcount", ""+itemcount);
				var total = itemcount * way.get("Lottery.times")
						* way.get("http://www.yugj881.com/resources/main/lottery/Lottery.yjf") * Env.price;
				if (total)
					way.set("Lottery.total", total.toFixed(4));
				else
					way.set("Lottery.total", "0");
			} else {
				way.set("Lottery.total", "0");
			}
		},
		clear : function() {
			var ss = [ "zu" ];
			for (k = 0; k < 1; k++)
				for (i = 0; i <= 9; i++) {
					var item = $("#bdw2mjc_" + ss[k] + "_" + i);
					if (item.hasClass("cur")) {
						item.trigger('click');
					}
				}
		}
	},
	"bdw3mjc" : {
		showname : '三码计重',
		rulecode : 'bdw3mjc',
		realname : '[不定位_三码计重]',
		maxMultiplePerOrder : -1,
		maxPrize : -1,
		maxRecord : -1,
		
		minMode : 1850,
		startPrice : 11.82,
		calculatePrize : Env.defaultCalculate,
		pageHtml :'<dl class="danqiu" id="bdw3mjc"><dd><h5>三码计重</h5>'
			+ '<ul class="sz-qiu"><li  id="bdw3mjc_zu_0">0</li><li id="bdw3mjc_zu_1">1</li><li id="bdw3mjc_zu_2">2</li>'
			+'<li id="bdw3mjc_zu_3">3</li><li id="bdw3mjc_zu_4">4</li><li id="bdw3mjc_zu_5">5</li><li id="bdw3mjc_zu_6">6</li>'
			+'<li id="bdw3mjc_zu_7">7</li><li id="bdw3mjc_zu_8">8</li><li id="bdw3mjc_zu_9">9</li></ul>'
			+ '<ul class="gongn"><li datascope="bdw3mjc_zu_ful_0-9">全</li><li datascope="bdw3mjc_zu_big_0-9">大</li><li datascope="bdw3mjc_zu_sma_0-9">小</li>'
			+'<li datascope="bdw3mjc_zu_sin_0-9">单</li><li datascope="bdw3mjc_zu_dou_0-9">双</li><li datascope="bdw3mjc_zu_cle_0-9">清</li></ul></dd></dl>',
		bettips : '至少选择三个号码组成一注。',
		betexample : '投注方案：每注号码由三个数字组成，例如投注356，只要开奖号码中3出现的次数加上5出现的次数加上6出现的次数大于等于3即中奖。如果出现了3个3，但是没出现56也是中奖。',
		bethelp : '玩法：每注号码由三个数字组成。',
		vali : function() {
			if (!way.get(this.rulecode + ".count.zu")) {
				way.set("Lottery.itemcount", "0");
				way.set("Lottery.total", "0");
			} else if (way.get("Lottery.times")) {
				var itemcount = way.get(this.rulecode + ".count.zu");
				if (itemcount >= 3) {
					itemcount = itemcount * (itemcount - 1) * (itemcount - 2)/ 6;
				} else {
					itemcount = 0;
				}

				way.set("Lottery.itemcount", ""+itemcount);
				var total = itemcount * way.get("Lottery.times")
						* way.get("http://www.yugj881.com/resources/main/lottery/Lottery.yjf") * Env.price;
				if (total)
					way.set("Lottery.total", total.toFixed(4));
				else
					way.set("Lottery.total", "0");
			} else {
				way.set("Lottery.total", "0");
			}
		},
		clear : function() {
			var ss = [ "zu" ];
			for (k = 0; k < 1; k++)
				for (i = 0; i <= 9; i++) {
					var item = $("#bdw3mjc_" + ss[k] + "_" + i);
					if (item.hasClass("cur")) {
						item.trigger('click');
					}
				}
		}
	},
	"dweid" : {
		showname : '定位胆',
		rulecode : 'dweid',
		realname : '[定位胆_定位胆]',
		maxMultiplePerOrder : -1,
		maxPrize : -1,
		maxRecord : -1,
		obtainMaxBetNumberPerOrder : function(currentRecodNumber) {

			var max_p_n = 5;

			if (currentRecodNumber >= max_p_n) {

				return max_p_n;
			} else {

				return currentRecodNumber;
			}

		},
		
		fixed : 100,
		minMode : 1850,
		calculatePrize : Env.defaultCalculate,
		pageHtml : '<dl class="danqiu" id="dweid"><dd><h5>万位</h5>'
			+ '<ul class="sz-qiu"><li  id="dweid_w_0">0</li><li id="dweid_w_1">1</li><li id="dweid_w_2">2</li>'
			+'<li id="dweid_w_3">3</li><li id="dweid_w_4">4</li><li id="dweid_w_5">5</li><li id="dweid_w_6">6</li>'
			+'<li id="dweid_w_7">7</li><li id="dweid_w_8">8</li><li id="dweid_w_9">9</li></ul>'
			+ '<ul class="gongn"><li datascope="dweid_w_ful_0-9">全</li><li datascope="dweid_w_big_0-9">大</li><li datascope="dweid_w_sma_0-9">小</li>'
			+'<li datascope="dweid_w_sin_0-9">单</li><li datascope="dweid_w_dou_0-9">双</li><li datascope="dweid_w_cle_0-9">清</li></ul></dd>'
			+ '<dd><h5>千位</h5>'
			+ '<ul class="sz-qiu"><li  id="dweid_q_0">0</li><li id="dweid_q_1">1</li><li id="dweid_q_2">2</li>'
			+'<li id="dweid_q_3">3</li><li id="dweid_q_4">4</li><li id="dweid_q_5">5</li><li id="dweid_q_6">6</li>'
			+'<li id="dweid_q_7">7</li><li id="dweid_q_8">8</li><li id="dweid_q_9">9</li></ul>'
			+ '<ul class="gongn"><li datascope="dweid_q_ful_0-9">全</li><li datascope="dweid_q_big_0-9">大</li><li datascope="dweid_q_sma_0-9">小</li>'
			+'<li datascope="dweid_q_sin_0-9">单</li><li datascope="dweid_q_dou_0-9">双</li><li datascope="dweid_q_cle_0-9">清</li></ul></dd>'
			+ '<dd><h5>百位</h5>'
			+ '<ul class="sz-qiu"><li  id="dweid_b_0">0</li><li id="dweid_b_1">1</li><li id="dweid_b_2">2</li>'
			+'<li id="dweid_b_3">3</li><li id="dweid_b_4">4</li><li id="dweid_b_5">5</li><li id="dweid_b_6">6</li>'
			+'<li id="dweid_b_7">7</li><li id="dweid_b_8">8</li><li id="dweid_b_9">9</li></ul>'
			+ '<ul class="gongn"><li datascope="dweid_b_ful_0-9">全</li><li datascope="dweid_b_big_0-9">大</li><li datascope="dweid_b_sma_0-9">小</li>'
			+'<li datascope="dweid_b_sin_0-9">单</li><li datascope="dweid_b_dou_0-9">双</li><li datascope="dweid_b_cle_0-9">清</li></ul></dd>'
			+ '<dd><h5>十位</h5>'
			+ '<ul class="sz-qiu"><li  id="dweid_s_0">0</li><li id="dweid_s_1">1</li><li id="dweid_s_2">2</li>'
			+'<li id="dweid_s_3">3</li><li id="dweid_s_4">4</li><li id="dweid_s_5">5</li><li id="dweid_s_6">6</li>'
			+'<li id="dweid_s_7">7</li><li id="dweid_s_8">8</li><li id="dweid_s_9">9</li></ul>'
			+ '<ul class="gongn"><li datascope="dweid_s_ful_0-9">全</li><li datascope="dweid_s_big_0-9">大</li><li datascope="dweid_s_sma_0-9">小</li>'
			+'<li datascope="dweid_s_sin_0-9">单</li><li datascope="dweid_s_dou_0-9">双</li><li datascope="dweid_s_cle_0-9">清</li></ul></dd>'
			+ '<dd><h5>个位</h5>'
			+ '<ul class="sz-qiu"><li  id="dweid_g_0">0</li><li id="dweid_g_1">1</li><li id="dweid_g_2">2</li>'
			+'<li id="dweid_g_3">3</li><li id="dweid_g_4">4</li><li id="dweid_g_5">5</li><li id="dweid_g_6">6</li>'
			+'<li id="dweid_g_7">7</li><li id="dweid_g_8">8</li><li id="dweid_g_9">9</li></ul>'
			+ '<ul class="gongn"><li datascope="dweid_g_ful_0-9">全</li><li datascope="dweid_g_big_0-9">大</li><li datascope="dweid_g_sma_0-9">小</li>'
			+'<li datascope="dweid_g_sin_0-9">单</li><li datascope="dweid_g_dou_0-9">双</li><li datascope="dweid_g_cle_0-9">清</li></ul></dd></dl>',
		bettips : '从万、千、百、十、个位任意位置上任意选择1个或1个以上号码。',
		betexample : '投注方案：定万位为1，开奖号码为1****即为中奖',
		bethelp : '玩法：从万位、千位、百位、十位、个位任意位置上选择1个或1个以上号码，所选号码与相同位置上的开奖号码一致，即为中奖。',
		formatBalls : function(balls) {
			return formatBall(balls['w'])+','+formatBall(balls['q'])+','+
				formatBall(balls['b'])+','+formatBall(balls['s'])+','+formatBall(balls['g']);
		},
		vali : function() {
			if (!way.get(this.rulecode + ".count.w")
					&& !way.get(this.rulecode + ".count.q")
					&& !way.get(this.rulecode + ".count.b")
					&& !way.get(this.rulecode + ".count.s")
					&& !way.get(this.rulecode + ".count.g")) {
				way.set("Lottery.itemcount", "0");
				way.set("Lottery.total", "0");
			} else if (way.get("Lottery.times")) {
				var v_w = 0;
				var v_q = 0;
				var v_b = 0;
				var v_s = 0;
				var v_g = 0;
				if (way.get(this.rulecode + ".count.w"))
					v_w = way.get(this.rulecode + ".count.w");
				if (way.get(this.rulecode + ".count.q"))
					v_q = way.get(this.rulecode + ".count.q");
				if (way.get(this.rulecode + ".count.b"))
					v_b = way.get(this.rulecode + ".count.b");
				if (way.get(this.rulecode + ".count.s"))
					v_s = way.get(this.rulecode + ".count.s");
				if (way.get(this.rulecode + ".count.g"))
					v_g = way.get(this.rulecode + ".count.g");
				var itemcount = v_w + v_q + v_b + v_s + v_g;
				way.set("Lottery.itemcount", ""+itemcount);
				var total = itemcount * way.get("Lottery.times")
						* way.get("http://www.yugj881.com/resources/main/lottery/Lottery.yjf") * Env.price;
				if (total)
					way.set("Lottery.total", total.toFixed(4));
				else
					way.set("Lottery.total", "0");
			} else {
				way.set("Lottery.total", "0");
			}
		},
		clear : function() {
			var ss = [ "w", "q", "b", "s", "g" ];
			for (k = 0; k < 5; k++)
				for (i = 0; i <= 9; i++) {
					var item = $("#dweid_" + ss[k] + "_" + i);
					if (item.hasClass("cur")) {
						item.trigger('click');
					}
				}
		}
	},
	"dxdsqe" : {
		showname : '大小单双',
		rulecode : 'dxdsqe',
		realname : '[大小单双_前二]',
		maxMultiplePerOrder : -1,
		maxPrize : -1,
		maxRecord : -1,
		
		minMode : 1850,
		startPrice : 6.8,
		calculatePrize : Env.defaultCalculate,
		pageHtml :'<dl class="danqiu" id="dxdsqe"><dd><h5>万位</h5>'
			+ '<ul class="sz-qiu"><li  id="dxdsqe_w_0">大</li><li id="dxdsqe_w_1">小</li><li id="dxdsqe_w_2">单</li>'
			+'<li id="dxdsqe_w_3">双</li></ul>'
			+ '</dd>'
			+'<dd><h5>千位</h5>'
			+ '<ul class="sz-qiu"><li  id="dxdsqe_q_0">大</li><li id="dxdsqe_q_1">小</li><li id="dxdsqe_q_2">单</li>'
			+'<li id="dxdsqe_q_3">双</li></ul>'
			+ '</dd></dl>',
		bettips : '从万、千位各选一个号码组成一注。',
		betexample : '投注方案：万位选择小，千位选择双，开出12***即为中奖。',
		bethelp : '玩法：大小单双:对万位和千位的“大（56789）小（01234）、单（13579）双（02468）”形态进行购买。',
		formatBalls : function(balls) {
			return formatBall(balls['w'])+','+formatBall(balls['q']);
		},
		replaceCode:function(codes){
			codes=codes.replace(new RegExp('0', 'g'),"大");
			codes=codes.replace(new RegExp('1', 'g'),"小");
			codes=codes.replace(new RegExp('2', 'g'),"单");
			codes=codes.replace(new RegExp('3', 'g'),"双");
			return codes;
		},
		vali : function() {
			if (!way.get(this.rulecode + ".count.w")
					|| !way.get(this.rulecode + ".count.q")) {
				way.set("Lottery.itemcount", "0");
				way.set("Lottery.total", "0");
			} else if (way.get("Lottery.times")) {
				var itemcount = way.get(this.rulecode + ".count.w")
						* way.get(this.rulecode + ".count.q");
				way.set("Lottery.itemcount", ""+itemcount);
				var total = itemcount * way.get("Lottery.times")
						* way.get("http://www.yugj881.com/resources/main/lottery/Lottery.yjf") * Env.price;
				if (total)
					way.set("Lottery.total", total.toFixed(4));
				else
					way.set("Lottery.total", "0");
			} else {
				way.set("Lottery.total", "0");
			}
		},
		clear : function() {
			var ss = [ "w", "q" ];
			for (k = 0; k < 2; k++)
				for (i = 0; i <= 3; i++) {
					var item = $("#dxdsqe_" + ss[k] + "_" + i);
					if (item.hasClass("cur")) {
						item.trigger('click');
					}
				}
		}
	},
	"dxdshe" : {
		showname : '大小单双',
		rulecode : 'dxdshe',
		realname : '[大小单双_后二]',
		maxMultiplePerOrder : -1,
		maxPrize : -1,
		maxRecord : -1,
		
		minMode : 1850,
		startPrice : 6.8,
		calculatePrize : Env.defaultCalculate,
		pageHtml :'<dl class="danqiu" id="dxdshe"><dd><h5>十位</h5>'
			+ '<ul class="sz-qiu"><li  id="dxdshe_s_0">大</li><li id="dxdshe_s_1">小</li><li id="dxdshe_s_2">单</li>'
			+'<li id="dxdshe_s_3">双</li></ul>'
			+ '</dd>'
			+'<dd><h5>个位</h5>'
			+ '<ul class="sz-qiu"><li  id="dxdshe_g_0">大</li><li id="dxdshe_g_1">小</li><li id="dxdshe_g_2">单</li>'
			+'<li id="dxdshe_g_3">双</li></ul>'
			+ '</dd></dl>',
		bettips : '从十、个位各选一个号码组成一注。',
		betexample : '投注方案：十位选择小，个位选择双，开出***12即为中奖。',
		bethelp : '玩法：大小单双:对十位和个位的“大（56789）小（01234）、单（13579）双（02468）”形态进行购买。',
		formatBalls : function(balls) {
			return formatBall(balls['s'])+','+formatBall(balls['g']);
		},
		replaceCode:function(codes){
			codes=codes.replace(new RegExp('0', 'g'),"大");
			codes=codes.replace(new RegExp('1', 'g'),"小");
			codes=codes.replace(new RegExp('2', 'g'),"单");
			codes=codes.replace(new RegExp('3', 'g'),"双");
			return codes;
		},
		vali : function() {
			if (!way.get(this.rulecode + ".count.s")
					|| !way.get(this.rulecode + ".count.g")) {
				way.set("Lottery.itemcount", "0");
				way.set("Lottery.total", "0");
			} else if (way.get("Lottery.times")) {
				var itemcount = way.get(this.rulecode + ".count.s")
						* way.get(this.rulecode + ".count.g");
				way.set("Lottery.itemcount", ""+itemcount);
				var total = itemcount * way.get("Lottery.times")
						* way.get("http://www.yugj881.com/resources/main/lottery/Lottery.yjf") * Env.price;
				if (total)
					way.set("Lottery.total", total.toFixed(4));
				else
					way.set("Lottery.total", "0");
			} else {
				way.set("Lottery.total", "0");
			}
		},
		clear : function() {
			var ss = [ "s", "g" ];
			for (k = 0; k < 2; k++)
				for (i = 0; i <= 3; i++) {
					var item = $("#dxdshe_" + ss[k] + "_" + i);
					if (item.hasClass("cur")) {
						item.trigger('click');
					}
				}
		}
	},
	"dxdshz": {
		showname: '大小单双',
		rulecode: 'dxdshz',
		realname: '[大小单双_和值]',
		maxMultiplePerOrder: -1,
		maxPrize: -1,
		maxRecord: -1,
		minMode: 1850,
		startPrice: 0,
		calculatePrize: Env.defaultCalculate,
		pageHtml: '<dl class="danqiu" id="dxdshz"><dd><h5>和值直选</h5>'+
		'<ul class="sz-qiu">' +
		'<li id="dxdshz_zu_0">大</li><li id="dxdshz_zu_1">小</li><li id="dxdshz_zu_2">单</li><li id="dxdshz_zu_3">双</li>' +
		'</ul>' +
		'</dd></dl>',
		bettips: '任选一个号码组成一注。',
		betexample: '投注方案：选大，开奖号码五个球之和大于等于 23 即为中奖。',
		bethelp: '投注玩法：任选一个号码为一注，五个开奖号码之和大于等于 23 为大、小于 23 为小、之和不能被 2 整除为单、之和能被 2 整除为双；',
		replaceCode: function(codes) {
			codes = codes.replace(new RegExp('0', 'g'), "大");
			codes = codes.replace(new RegExp('1', 'g'), "小");
			codes = codes.replace(new RegExp('2', 'g'), "单");
			codes = codes.replace(new RegExp('3', 'g'), "双");
			return codes;
		},
		vali: function() {
			if (!way.get(this.rulecode + ".count.zu")) {
				way.set("Lottery.itemcount", "0");
				way.set("Lottery.total", "0");
			} else if (way.get("Lottery.times")) {
				var itemcount = way.get(this.rulecode + ".count.zu");
				var m_balls = way.get(this.rulecode + ".balls.zu");
				way.set("Lottery.itemcount", "" + itemcount);
				var total = itemcount * way.get("Lottery.times") * way.get("http://www.yugj881.com/resources/main/lottery/Lottery.yjf") * Env.price;
				if (total) {
					way.set("Lottery.total", total.toFixed(4));
				} else {
					way.set("Lottery.total", "0");
				}
			} else {
				way.set("Lottery.total", "0");
			}
		},
		clear: function() {
			var ss = ["zu"];
			for (var k = 0; k < 1; k++)
				for (var i = 0; i <= 3; i++) {
					var item = $("#dxdshz_" + ss[k] + "_" + i);
					if (item.hasClass("cur")) {
						item.trigger('click');
					}
				}
		}
	},
	"rx4fs" : {
		showname : '任四复式',
		rulecode : 'rx4fs',
		realname : '[任选_任四复式]',
		maxMultiplePerOrder : -1,
		maxPrize : -1,
		maxRecord : -1,
		
		fixed : 0.1,
		minMode : 1850,
		calculatePrize : Env.defaultCalculate,
		pageHtml : '<dl class="danqiu" id="rx4fs"><dd><h5>万位</h5>'
			+ '<ul class="sz-qiu"><li  id="rx4fs_w_0">0</li><li id="rx4fs_w_1">1</li><li id="rx4fs_w_2">2</li>'
			+'<li id="rx4fs_w_3">3</li><li id="rx4fs_w_4">4</li><li id="rx4fs_w_5">5</li><li id="rx4fs_w_6">6</li>'
			+'<li id="rx4fs_w_7">7</li><li id="rx4fs_w_8">8</li><li id="rx4fs_w_9">9</li></ul>'
			+ '<ul class="gongn"><li datascope="rx4fs_w_ful_0-9">全</li><li datascope="rx4fs_w_big_0-9">大</li><li datascope="rx4fs_w_sma_0-9">小</li>'
			+'<li datascope="rx4fs_w_sin_0-9">单</li><li datascope="rx4fs_w_dou_0-9">双</li><li datascope="rx4fs_w_cle_0-9">清</li></ul></dd>'
			+ '<dd><h5>千位</h5>'
			+ '<ul class="sz-qiu"><li  id="rx4fs_q_0">0</li><li id="rx4fs_q_1">1</li><li id="rx4fs_q_2">2</li>'
			+'<li id="rx4fs_q_3">3</li><li id="rx4fs_q_4">4</li><li id="rx4fs_q_5">5</li><li id="rx4fs_q_6">6</li>'
			+'<li id="rx4fs_q_7">7</li><li id="rx4fs_q_8">8</li><li id="rx4fs_q_9">9</li></ul>'
			+ '<ul class="gongn"><li datascope="rx4fs_q_ful_0-9">全</li><li datascope="rx4fs_q_big_0-9">大</li><li datascope="rx4fs_q_sma_0-9">小</li>'
			+'<li datascope="rx4fs_q_sin_0-9">单</li><li datascope="rx4fs_q_dou_0-9">双</li><li datascope="rx4fs_q_cle_0-9">清</li></ul></dd>'
			+ '<dd><h5>百位</h5>'
			+ '<ul class="sz-qiu"><li  id="rx4fs_b_0">0</li><li id="rx4fs_b_1">1</li><li id="rx4fs_b_2">2</li>'
			+'<li id="rx4fs_b_3">3</li><li id="rx4fs_b_4">4</li><li id="rx4fs_b_5">5</li><li id="rx4fs_b_6">6</li>'
			+'<li id="rx4fs_b_7">7</li><li id="rx4fs_b_8">8</li><li id="rx4fs_b_9">9</li></ul>'
			+ '<ul class="gongn"><li datascope="rx4fs_b_ful_0-9">全</li><li datascope="rx4fs_b_big_0-9">大</li><li datascope="rx4fs_b_sma_0-9">小</li>'
			+'<li datascope="rx4fs_b_sin_0-9">单</li><li datascope="rx4fs_b_dou_0-9">双</li><li datascope="rx4fs_b_cle_0-9">清</li></ul></dd>'
			+ '<dd><h5>十位</h5>'
			+ '<ul class="sz-qiu"><li  id="rx4fs_s_0">0</li><li id="rx4fs_s_1">1</li><li id="rx4fs_s_2">2</li>'
			+'<li id="rx4fs_s_3">3</li><li id="rx4fs_s_4">4</li><li id="rx4fs_s_5">5</li><li id="rx4fs_s_6">6</li>'
			+'<li id="rx4fs_s_7">7</li><li id="rx4fs_s_8">8</li><li id="rx4fs_s_9">9</li></ul>'
			+ '<ul class="gongn"><li datascope="rx4fs_s_ful_0-9">全</li><li datascope="rx4fs_s_big_0-9">大</li><li datascope="rx4fs_s_sma_0-9">小</li>'
			+'<li datascope="rx4fs_s_sin_0-9">单</li><li datascope="rx4fs_s_dou_0-9">双</li><li datascope="rx4fs_s_cle_0-9">清</li></ul></dd>'
			+ '<dd><h5>个位</h5>'
			+ '<ul class="sz-qiu"><li  id="rx4fs_g_0">0</li><li id="rx4fs_g_1">1</li><li id="rx4fs_g_2">2</li>'
			+'<li id="rx4fs_g_3">3</li><li id="rx4fs_g_4">4</li><li id="rx4fs_g_5">5</li><li id="rx4fs_g_6">6</li>'
			+'<li id="rx4fs_g_7">7</li><li id="rx4fs_g_8">8</li><li id="rx4fs_g_9">9</li></ul>'
			+ '<ul class="gongn"><li datascope="rx4fs_g_ful_0-9">全</li><li datascope="rx4fs_g_big_0-9">大</li><li datascope="rx4fs_g_sma_0-9">小</li>'
			+'<li datascope="rx4fs_g_sin_0-9">单</li><li datascope="rx4fs_g_dou_0-9">双</li><li datascope="rx4fs_g_cle_0-9">清</li></ul></dd></dl>',
		bettips : '从万、千、百、十、个任四位选一个号码组成一注。',
		betexample : '投注方案：2*456；开奖号码：2*456',
		bethelp : '玩法：任选四位与开奖号分别对应相同且顺序一致即为中奖。',
		formatBalls : function(balls) {
			return formatBall(balls['w'])+','+formatBall(balls['q'])+','+
				formatBall(balls['b'])+','+formatBall(balls['s'])+','+formatBall(balls['g']);
		},
		vali : function() {

			var datasel = [ 'w', 'q', 'b', 's', 'g' ];
			var newsel = [];
			for (var i = 0; i < datasel.length; i++) {
				if (way.get(this.rulecode + ".count." + datasel[i])
						&& way.get(this.rulecode + ".count." + datasel[i]) > 0) {
					newsel.push(datasel[i]);
				}
			}

			if (newsel.length < 4) {
				way.set("Lottery.itemcount", "0");
				way.set("Lottery.total", "0");
			} else if (way.get("Lottery.times")) {

				var aPositionCombo = Lottery_Rule.getCombination(newsel, 4);
				var nums = 0;
				var iComboLen = aPositionCombo.length;
				var aCombo = [];
				var iLen = 0;
				var tmpNums = 1;
				for (j = 0; j < iComboLen; j++) {

					aCombo = aPositionCombo[j].split(",");
					iLen = aCombo.length;
					tmpNums = 1;
					for (h = 0; h < iLen; h++) {
						tmpNums *= way.get(this.rulecode + ".count."
								+ aCombo[h]);
					}
					nums += tmpNums
				}

				var itemcount = nums;
				way.set("Lottery.itemcount", ""+itemcount);
				var total = itemcount * way.get("Lottery.times")
						* way.get("http://www.yugj881.com/resources/main/lottery/Lottery.yjf") * Env.price;
				if (total)
					way.set("Lottery.total", total.toFixed(4));
				else
					way.set("Lottery.total", "0");
			} else {
				way.set("Lottery.total", "0");
			}
		},
		clear : function() {
			var ss = [ "w", "q", "b", "s", "g" ];
			for (k = 0; k < 5; k++)
				for (i = 0; i <= 9; i++) {
					var item = $("#rx4fs_" + ss[k] + "_" + i);
					if (item.hasClass("cur")) {
						item.trigger('click');
					}
				}
		}
	},
	"rx4ds" : {
		showname : '任四单式',
		rulecode : 'rx4ds',
		realname : '[任选_任四单式]',
		maxMultiplePerOrder : -1,
		maxPrize : -1,
		maxRecord : -1,
		isPlaces:true,
		fixed : 0.1,
		minMode : 1850,
		calculatePrize : Env.defaultCalculate,
		bettips : '键盘手动输入购买号码，4个数字为一注，所选开奖号码符合对应所选位置即中奖。',
		betexample : '投注方案：*2345； 选择对应位：千、百、十、个，开奖号码：*2345，即为中奖',
		bethelp : '玩法：键盘手动输入购买号码，4个数字为一注，所选开奖号码符合对应所选位置即中奖。',
		textarea : {},
		vali : function(k) {
			var itemcount = 0;
			if (way.get("Lottery.context")) {
				var v = way.get("Lottery.context");
				var reg = /\b[0-9]{4}\b/g;
				// 去重复
				var sszz = util_unique(v, reg);
				sszz = sszz.sort();
				if (sszz) {
					itemcount = sszz.length;
					way.set("Lottery.contexts", sszz);
				}
			}
			if (way.get("Lottery.count.places")
					&& way.get("Lottery.count.places") >= 4) {
				if (way.get("Lottery.count.places") == 5) {
					itemcount = itemcount * 5;
				}
			} else {
				way.set("Lottery.itemcount", "0");
				way.set("Lottery.total", "0");
				return;
			}

			if (way.get("Lottery.times")) {
				if (itemcount)
					way.set("Lottery.itemcount", ""+itemcount);
				else
					way.set("Lottery.itemcount", "0");
				var total = itemcount * way.get("Lottery.times")
						* way.get("http://www.yugj881.com/resources/main/lottery/Lottery.yjf") * Env.price;
				if (total)
					way.set("Lottery.total", total.toFixed(4));
				else
					way.set("Lottery.total", "0");
			} else {
				way.set("Lottery.itemcount", "0");
				way.set("Lottery.total", "0");
			}
		},
		changeContext : function(e) {
			var k = String.fromCharCode(e.which);
			if (isNaN(parseInt(k))) {
				if (k != ' ' && k != ',' && k != ';')
					e.returnValue = false;
			}
		},
		clear : function() {
			way.set("Lottery.context", "");
		}
	},
	"rx3fs" : {
		showname : '任三复式',
		rulecode : 'rx3fs',
		realname : '[任选_任三复式]',
		maxMultiplePerOrder : -1,
		maxPrize : -1,
		maxRecord : -1,
		
		fixed : 1,
		minMode : 1850,
		calculatePrize : Env.defaultCalculate,
		pageHtml : '<dl class="danqiu" id="rx3fs"><dd><h5>万位</h5>'
			+ '<ul class="sz-qiu"><li  id="rx3fs_w_0">0</li><li id="rx3fs_w_1">1</li><li id="rx3fs_w_2">2</li>'
			+'<li id="rx3fs_w_3">3</li><li id="rx3fs_w_4">4</li><li id="rx3fs_w_5">5</li><li id="rx3fs_w_6">6</li>'
			+'<li id="rx3fs_w_7">7</li><li id="rx3fs_w_8">8</li><li id="rx3fs_w_9">9</li></ul>'
			+ '<ul class="gongn"><li datascope="rx3fs_w_ful_0-9">全</li><li datascope="rx3fs_w_big_0-9">大</li><li datascope="rx3fs_w_sma_0-9">小</li>'
			+'<li datascope="rx3fs_w_sin_0-9">单</li><li datascope="rx3fs_w_dou_0-9">双</li><li datascope="rx3fs_w_cle_0-9">清</li></ul></dd>'
			+ '<dd><h5>千位</h5>'
			+ '<ul class="sz-qiu"><li  id="rx3fs_q_0">0</li><li id="rx3fs_q_1">1</li><li id="rx3fs_q_2">2</li>'
			+'<li id="rx3fs_q_3">3</li><li id="rx3fs_q_4">4</li><li id="rx3fs_q_5">5</li><li id="rx3fs_q_6">6</li>'
			+'<li id="rx3fs_q_7">7</li><li id="rx3fs_q_8">8</li><li id="rx3fs_q_9">9</li></ul>'
			+ '<ul class="gongn"><li datascope="rx3fs_q_ful_0-9">全</li><li datascope="rx3fs_q_big_0-9">大</li><li datascope="rx3fs_q_sma_0-9">小</li>'
			+'<li datascope="rx3fs_q_sin_0-9">单</li><li datascope="rx3fs_q_dou_0-9">双</li><li datascope="rx3fs_q_cle_0-9">清</li></ul></dd>'
			+ '<dd><h5>百位</h5>'
			+ '<ul class="sz-qiu"><li  id="rx3fs_b_0">0</li><li id="rx3fs_b_1">1</li><li id="rx3fs_b_2">2</li>'
			+'<li id="rx3fs_b_3">3</li><li id="rx3fs_b_4">4</li><li id="rx3fs_b_5">5</li><li id="rx3fs_b_6">6</li>'
			+'<li id="rx3fs_b_7">7</li><li id="rx3fs_b_8">8</li><li id="rx3fs_b_9">9</li></ul>'
			+ '<ul class="gongn"><li datascope="rx3fs_b_ful_0-9">全</li><li datascope="rx3fs_b_big_0-9">大</li><li datascope="rx3fs_b_sma_0-9">小</li>'
			+'<li datascope="rx3fs_b_sin_0-9">单</li><li datascope="rx3fs_b_dou_0-9">双</li><li datascope="rx3fs_b_cle_0-9">清</li></ul></dd>'
			+ '<dd><h5>十位</h5>'
			+ '<ul class="sz-qiu"><li  id="rx3fs_s_0">0</li><li id="rx3fs_s_1">1</li><li id="rx3fs_s_2">2</li>'
			+'<li id="rx3fs_s_3">3</li><li id="rx3fs_s_4">4</li><li id="rx3fs_s_5">5</li><li id="rx3fs_s_6">6</li>'
			+'<li id="rx3fs_s_7">7</li><li id="rx3fs_s_8">8</li><li id="rx3fs_s_9">9</li></ul>'
			+ '<ul class="gongn"><li datascope="rx3fs_s_ful_0-9">全</li><li datascope="rx3fs_s_big_0-9">大</li><li datascope="rx3fs_s_sma_0-9">小</li>'
			+'<li datascope="rx3fs_s_sin_0-9">单</li><li datascope="rx3fs_s_dou_0-9">双</li><li datascope="rx3fs_s_cle_0-9">清</li></ul></dd>'
			+ '<dd><h5>个位</h5>'
			+ '<ul class="sz-qiu"><li  id="rx3fs_g_0">0</li><li id="rx3fs_g_1">1</li><li id="rx3fs_g_2">2</li>'
			+'<li id="rx3fs_g_3">3</li><li id="rx3fs_g_4">4</li><li id="rx3fs_g_5">5</li><li id="rx3fs_g_6">6</li>'
			+'<li id="rx3fs_g_7">7</li><li id="rx3fs_g_8">8</li><li id="rx3fs_g_9">9</li></ul>'
			+ '<ul class="gongn"><li datascope="rx3fs_g_ful_0-9">全</li><li datascope="rx3fs_g_big_0-9">大</li><li datascope="rx3fs_g_sma_0-9">小</li>'
			+'<li datascope="rx3fs_g_sin_0-9">单</li><li datascope="rx3fs_g_dou_0-9">双</li><li datascope="rx3fs_g_cle_0-9">清</li></ul></dd></dl>',
		bettips : '从万、千、百、十、个任三位选一个号码组成一注。',
		betexample : '投注方案：2*4*6；开奖号码：2*4*6',
		bethelp : '玩法：任选三位与开奖号分别对应相同且顺序一致即为中奖。',
		formatBalls : function(balls) {
			return formatBall(balls['w'])+','+formatBall(balls['q'])+','+
				formatBall(balls['b'])+','+formatBall(balls['s'])+','+formatBall(balls['g']);
		},
		vali : function() {

			var datasel = [ 'w', 'q', 'b', 's', 'g' ];
			var newsel = [];
			for (var i = 0; i < datasel.length; i++) {
				if (way.get(this.rulecode + ".count." + datasel[i])
						&& way.get(this.rulecode + ".count." + datasel[i]) > 0) {
					newsel.push(datasel[i]);
				}
			}

			if (newsel.length < 3) {
				way.set("Lottery.itemcount", "0");
				way.set("Lottery.total", "0");
			} else if (way.get("Lottery.times")) {

				var aPositionCombo = Lottery_Rule.getCombination(newsel, 3);
				var nums = 0;
				var iComboLen = aPositionCombo.length;
				var aCombo = [];
				var iLen = 0;
				var tmpNums = 1;
				for (j = 0; j < iComboLen; j++) {

					aCombo = aPositionCombo[j].split(",");
					iLen = aCombo.length;
					tmpNums = 1;
					for (h = 0; h < iLen; h++) {
						tmpNums *= way.get(this.rulecode + ".count."
								+ aCombo[h]);
					}
					nums += tmpNums
				}

				var itemcount = nums;
				way.set("Lottery.itemcount", ""+itemcount);
				var total = itemcount * way.get("Lottery.times")
						* way.get("http://www.yugj881.com/resources/main/lottery/Lottery.yjf") * Env.price;
				if (total)
					way.set("Lottery.total", total.toFixed(4));
				else
					way.set("Lottery.total", "0");
			} else {
				way.set("Lottery.total", "0");
			}
		},
		clear : function() {
			var ss = [ "w", "q", "b", "s", "g" ];
			for (k = 0; k < 5; k++)
				for (i = 0; i <= 9; i++) {
					var item = $("#rx3fs_" + ss[k] + "_" + i);
					if (item.hasClass("cur")) {
						item.trigger('click');
					}
				}
		}
	},
	"rx3ds" : {
		showname : '任三单式',
		rulecode : 'rx3ds',
		realname : '[任选_任三单式]',
		maxMultiplePerOrder : -1,
		maxPrize : -1,
		maxRecord : -1,
		isPlaces:true,
		fixed : 1,
		minMode : 1850,
		calculatePrize : Env.defaultCalculate,
		bettips : '手动输入号码，至少输入1个三位数号码组成一注。并选择对应位',
		betexample : '投注方案：**345； 选择对应位：百、十、个，开奖号码：**345，即为中奖',
		bethelp : '玩法：手动输入一个3位数号码组成一注，所选号码与开奖号码的对应位相同，且顺序一致，即为中奖。',
		textarea : {},
		vali : function(k) {
			var itemcount = 0;
			if (way.get("Lottery.context")) {
				var v = way.get("Lottery.context");
				var reg = /\b[0-9]{3}\b/g;
				// 去重复
				var sszz = util_unique(v, reg);
				sszz = sszz.sort();
				if (sszz) {
					itemcount = sszz.length;
					way.set("Lottery.contexts", sszz);
				}
			}

			if (way.get("Lottery.count.places")
					&& way.get("Lottery.count.places") >= 3) {
				if (way.get("Lottery.count.places") == 5) {
					itemcount = itemcount * 10;
				} else if (way.get("Lottery.count.places") == 4) {
					itemcount = itemcount * 4;
				}
			} else {
				way.set("Lottery.itemcount", "0");
				way.set("Lottery.total", "0");
				return;
			}

			if (way.get("Lottery.times")) {
				if (itemcount)
					way.set("Lottery.itemcount", ""+itemcount);
				else
					way.set("Lottery.itemcount", "0");
				var total = itemcount * way.get("Lottery.times")
						* way.get("http://www.yugj881.com/resources/main/lottery/Lottery.yjf") * Env.price;
				if (total)
					way.set("Lottery.total", total.toFixed(4));
				else
					way.set("Lottery.total", "0");
			} else {
				way.set("Lottery.itemcount", "0");
				way.set("Lottery.total", "0");
			}
		},
		changeContext : function(e) {
			var k = String.fromCharCode(e.which);
			if (isNaN(parseInt(k))) {
				if (k != ' ' && k != ',' && k != ';')
					e.returnValue = false;
			}
		},
		clear : function() {
			way.set("Lottery.context", "");
		}
	},
	"rx3z6" : {
		showname : '任三组六',
		rulecode : 'rx3z6',
		realname : '[任选_任三组六]',
		maxMultiplePerOrder : -1,
		maxPrize : -1,
		maxRecord : -1,
		
		fixed : 6,
		minMode : 1850,
		calculatePrize : Env.defaultCalculate,
		pageHtml :'<dl class="danqiu" id="rx3z6"><dd>'
			+ '<ul class="sz-qiu"><li id="rx3z6_places_0">万位</li><li id="rx3z6_places_1">千位</li>'
			+'<li id="rx3z6_places_2">百位</li><li id="rx3z6_places_3">十位</li><li id="rx3z6_places_4">个位</li></ul></dd>'
			+'<dd><h5>任三组六</h5>'
			+ '<ul class="sz-qiu"><li  id="rx3z6_zu_0">0</li><li id="rx3z6_zu_1">1</li><li id="rx3z6_zu_2">2</li>'
			+'<li id="rx3z6_zu_3">3</li><li id="rx3z6_zu_4">4</li><li id="rx3z6_zu_5">5</li><li id="rx3z6_zu_6">6</li>'
			+'<li id="rx3z6_zu_7">7</li><li id="rx3z6_zu_8">8</li><li id="rx3z6_zu_9">9</li></ul>'
			+ '<ul class="gongn"><li datascope="rx3z6_zu_ful_0-9">全</li><li datascope="rx3z6_zu_big_0-9">大</li><li datascope="rx3z6_zu_sma_0-9">小</li>'
			+'<li datascope="rx3z6_zu_sin_0-9">单</li><li datascope="rx3z6_zu_dou_0-9">双</li><li datascope="rx3z6_zu_cle_0-9">清</li></ul></dd></dl>',
		bettips : '至少选择三个号码组成一注，并选择三个对应位。',
		betexample : '投注方案：选择123（展开为**123，**132，**231，**213，**312，**321）,开奖为**321，即为中奖。',
		bethelp : '玩法：从0-9中任意选择3个号码组成一注，所选号码与开奖号码的对应位相同，顺序不限，即为中奖。',
		formatBalls : function(balls) {
			return formatBall(balls['places'], true)+','+formatBall(balls['zu']);
		},
		vali : function() {
			if (!way.get(this.rulecode + ".count.zu")
					|| way.get(this.rulecode + ".count.zu") < 3
					|| !way.get(this.rulecode + ".count.places")
					|| way.get(this.rulecode + ".count.places") <3) {
				way.set("Lottery.itemcount", "0");
				way.set("Lottery.total", "0");
			} else if (way.get("Lottery.times")) {
				var itemcount = way.get(this.rulecode + ".count.zu");
				var places =way.get(this.rulecode + ".count.places");
				places = places*(places-1)*(places-2)/6;
				itemcount = places*itemcount * (itemcount - 1) * (itemcount - 2) / 6;
				way.set("Lottery.itemcount", ""+itemcount);
				var total = itemcount * way.get("Lottery.times")
						* way.get("http://www.yugj881.com/resources/main/lottery/Lottery.yjf") * Env.price;
				if (total)
					way.set("Lottery.total", total.toFixed(4));
				else
					way.set("Lottery.total", "0");
			} else {
				way.set("Lottery.total", "0");
			}
		},
		clear : function() {
			var ss = [ "zu" ];
			for (k = 0; k < 1; k++)
				for (i = 0; i <= 9; i++) {
					var item = $("#rx3z6_" + ss[k] + "_" + i);
					if (item.hasClass("cur")) {
						item.trigger('click');
					}
				}
		}
	},
	"rx3z3" : {
		showname : '任三组三',
		rulecode : 'rx3z3',
		realname : '[任选_任三组三]',
		maxMultiplePerOrder : -1,
		maxPrize : -1,
		maxRecord : -1,
		
		fixed : 3,
		minMode : 1850,
		calculatePrize : Env.defaultCalculate,
		pageHtml :'<dl class="danqiu" id="rx3z3"><dd>'
			+ '<ul class="sz-qiu"><li id="rx3z3_places_0">万位</li><li id="rx3z3_places_1">千位</li>'
			+'<li id="rx3z3_places_2">百位</li><li id="rx3z3_places_3">十位</li><li id="rx3z3_places_4">个位</li></ul></dd>'
			+'<dd><h5>任三组三</h5>'
			+ '<ul class="sz-qiu"><li  id="rx3z3_zu_0">0</li><li id="rx3z3_zu_1">1</li><li id="rx3z3_zu_2">2</li>'
			+'<li id="rx3z3_zu_3">3</li><li id="rx3z3_zu_4">4</li><li id="rx3z3_zu_5">5</li><li id="rx3z3_zu_6">6</li>'
			+'<li id="rx3z3_zu_7">7</li><li id="rx3z3_zu_8">8</li><li id="rx3z3_zu_9">9</li></ul>'
			+ '<ul class="gongn"><li datascope="rx3z3_zu_ful_0-9">全</li><li datascope="rx3z3_zu_big_0-9">大</li><li datascope="rx3z3_zu_sma_0-9">小</li>'
			+'<li datascope="rx3z3_zu_sin_0-9">单</li><li datascope="rx3z3_zu_dou_0-9">双</li><li datascope="rx3z3_zu_cle_0-9">清</li></ul></dd></dl>',
		bettips : '至少选择两个号码组成一注，并选择三个对应位。',
		betexample : '投注方案：选择12（展开为**122，**212，**221 和 **112、**121、**211）,开奖为**212 或 **121，即为中奖。',
		bethelp : '玩法：0-9中任意选择2个号码组成两注，所选号码与开奖号码的对应位相同，且顺序不限，即为中奖。',
		formatBalls : function(balls) {
			return formatBall(balls['places'], true)+','+formatBall(balls['zu']);
		},
		vali : function() {
			if (!way.get(this.rulecode + ".count.zu")
					|| way.get(this.rulecode + ".count.zu") < 2
					|| !way.get(this.rulecode + ".count.places")
					|| way.get(this.rulecode + ".count.places") < 3) {
				way.set("Lottery.itemcount", "0");
				way.set("Lottery.total", "0");
			} else if (way.get("Lottery.times")) {
				var itemcount = way.get(this.rulecode + ".count.zu");
				var  places =way.get(this.rulecode + ".count.places");
				places = places*(places-1)*(places-2)/6;
				itemcount = places*itemcount * (itemcount - 1);
				way.set("Lottery.itemcount", ""+itemcount);
				var total = itemcount * way.get("Lottery.times")
						* way.get("http://www.yugj881.com/resources/main/lottery/Lottery.yjf") * Env.price;
				if (total)
					way.set("Lottery.total", total.toFixed(4));
				else
					way.set("Lottery.total", "0");
			} else {
				way.set("Lottery.total", "0");
			}
		},
		clear : function() {
			var ss = [ "places" , "zu" ];
			for (k = 0; k < ss.length; k++)
				for (i = 0; i <= 9; i++) {
					var item = $("#rx3z3_" + ss[k] + "_" + i);
					if (item.hasClass("cur")) {
						item.trigger('click');
					}
				}
		}
	},
	"rx3zxhh" : {
		showname : '组选混合',
		rulecode : 'rx3zxhh',
		realname : '[任选_组选混合]',
		maxMultiplePerOrder : -1,
		maxPrize : -1,
		maxRecord : -1,
		isPlaces:true,
		obtainMaxBetNumberPerOrder : function(currentRecodNumber) {

			var max_p_n = 1 + (3 * 2);

			if (currentRecodNumber >= max_p_n) {

				return max_p_n;
			} else {

				return currentRecodNumber;
			}

		},
		
		fixed : 6,
		s_fixed : 3,
		minMode : 1850,
		calculatePrize : Env.defaultCalculate,
		bettips : '3个数字为一注，所选开奖号码符合对应所选位置的组三或组六均为中奖。',
		betexample : '投注方案：**345； 选择对应位：百、十、个，开奖号码：**345，即为中奖',
		bethelp : '玩法：3个数字为一注，所选开奖号码符合对应所选位置的组三或组六均为中奖。',
		textarea : {},
		vali : function(k) {
			var itemcount = 0;
			if (way.get("Lottery.context")) {
				var v = way.get("Lottery.context");
				var reg = /\b[0-9]{3}\b/g;
				// 去重复
				var sszz = util_unique(v, reg, 1, true, true);
				sszz = sszz.sort();
				if (sszz) {
					itemcount = sszz.length;
					way.set("Lottery.contexts", sszz);
				}
			}

			if (!way.get("Lottery.count.places")
					|| way.get("Lottery.count.places") <3) {
				itemcount = 0;
			}
			if (way.get("Lottery.times")) {
				if (itemcount){
					var  places =way.get("Lottery.count.places");
					places = places*(places-1)*(places-2)/6;
					itemcount=places*itemcount;
					way.set("Lottery.itemcount", ""+itemcount);
				}else
					way.set("Lottery.itemcount", "0");
				var total = itemcount * way.get("Lottery.times")
						* way.get("http://www.yugj881.com/resources/main/lottery/Lottery.yjf") * Env.price;
				if (total)
					way.set("Lottery.total", total.toFixed(4));
				else
					way.set("Lottery.total", "0");
			} else {
				way.set("Lottery.itemcount", "0");
				way.set("Lottery.total", "0");
			}
		},
		changeContext : function(e) {
			var k = String.fromCharCode(e.which);
			if (isNaN(parseInt(k))) {
				if (k != ' ' && k != ',' && k != ';')
					e.returnValue = false;
			}
		},
		clear : function() {
			way.set("Lottery.context", "");
		}
	},
	"rx2fs" : {
		showname : '任二复式',
		rulecode : 'rx2fs',
		realname : '[任选_任二复式]',
		maxMultiplePerOrder : -1,
		maxPrize : -1,
		maxRecord : -1,
		
		fixed : 10,
		minMode : 1850,
		calculatePrize : Env.defaultCalculate,
		pageHtml : '<dl class="danqiu" id="rx2fs"><dd><h5>万位</h5>'
			+ '<ul class="sz-qiu"><li  id="rx2fs_w_0">0</li><li id="rx2fs_w_1">1</li><li id="rx2fs_w_2">2</li>'
			+'<li id="rx2fs_w_3">3</li><li id="rx2fs_w_4">4</li><li id="rx2fs_w_5">5</li><li id="rx2fs_w_6">6</li>'
			+'<li id="rx2fs_w_7">7</li><li id="rx2fs_w_8">8</li><li id="rx2fs_w_9">9</li></ul>'
			+ '<ul class="gongn"><li datascope="rx2fs_w_ful_0-9">全</li><li datascope="rx2fs_w_big_0-9">大</li><li datascope="rx2fs_w_sma_0-9">小</li>'
			+'<li datascope="rx2fs_w_sin_0-9">单</li><li datascope="rx2fs_w_dou_0-9">双</li><li datascope="rx2fs_w_cle_0-9">清</li></ul></dd>'
			+ '<dd><h5>千位</h5>'
			+ '<ul class="sz-qiu"><li  id="rx2fs_q_0">0</li><li id="rx2fs_q_1">1</li><li id="rx2fs_q_2">2</li>'
			+'<li id="rx2fs_q_3">3</li><li id="rx2fs_q_4">4</li><li id="rx2fs_q_5">5</li><li id="rx2fs_q_6">6</li>'
			+'<li id="rx2fs_q_7">7</li><li id="rx2fs_q_8">8</li><li id="rx2fs_q_9">9</li></ul>'
			+ '<ul class="gongn"><li datascope="rx2fs_q_ful_0-9">全</li><li datascope="rx2fs_q_big_0-9">大</li><li datascope="rx2fs_q_sma_0-9">小</li>'
			+'<li datascope="rx2fs_q_sin_0-9">单</li><li datascope="rx2fs_q_dou_0-9">双</li><li datascope="rx2fs_q_cle_0-9">清</li></ul></dd>'
			+ '<dd><h5>百位</h5>'
			+ '<ul class="sz-qiu"><li  id="rx2fs_b_0">0</li><li id="rx2fs_b_1">1</li><li id="rx2fs_b_2">2</li>'
			+'<li id="rx2fs_b_3">3</li><li id="rx2fs_b_4">4</li><li id="rx2fs_b_5">5</li><li id="rx2fs_b_6">6</li>'
			+'<li id="rx2fs_b_7">7</li><li id="rx2fs_b_8">8</li><li id="rx2fs_b_9">9</li></ul>'
			+ '<ul class="gongn"><li datascope="rx2fs_b_ful_0-9">全</li><li datascope="rx2fs_b_big_0-9">大</li><li datascope="rx2fs_b_sma_0-9">小</li>'
			+'<li datascope="rx2fs_b_sin_0-9">单</li><li datascope="rx2fs_b_dou_0-9">双</li><li datascope="rx2fs_b_cle_0-9">清</li></ul></dd>'
			+ '<dd><h5>十位</h5>'
			+ '<ul class="sz-qiu"><li  id="rx2fs_s_0">0</li><li id="rx2fs_s_1">1</li><li id="rx2fs_s_2">2</li>'
			+'<li id="rx2fs_s_3">3</li><li id="rx2fs_s_4">4</li><li id="rx2fs_s_5">5</li><li id="rx2fs_s_6">6</li>'
			+'<li id="rx2fs_s_7">7</li><li id="rx2fs_s_8">8</li><li id="rx2fs_s_9">9</li></ul>'
			+ '<ul class="gongn"><li datascope="rx2fs_s_ful_0-9">全</li><li datascope="rx2fs_s_big_0-9">大</li><li datascope="rx2fs_s_sma_0-9">小</li>'
			+'<li datascope="rx2fs_s_sin_0-9">单</li><li datascope="rx2fs_s_dou_0-9">双</li><li datascope="rx2fs_s_cle_0-9">清</li></ul></dd>'
			+ '<dd><h5>个位</h5>'
			+ '<ul class="sz-qiu"><li  id="rx2fs_g_0">0</li><li id="rx2fs_g_1">1</li><li id="rx2fs_g_2">2</li>'
			+'<li id="rx2fs_g_3">3</li><li id="rx2fs_g_4">4</li><li id="rx2fs_g_5">5</li><li id="rx2fs_g_6">6</li>'
			+'<li id="rx2fs_g_7">7</li><li id="rx2fs_g_8">8</li><li id="rx2fs_g_9">9</li></ul>'
			+ '<ul class="gongn"><li datascope="rx2fs_g_ful_0-9">全</li><li datascope="rx2fs_g_big_0-9">大</li><li datascope="rx2fs_g_sma_0-9">小</li>'
			+'<li datascope="rx2fs_g_sin_0-9">单</li><li datascope="rx2fs_g_dou_0-9">双</li><li datascope="rx2fs_g_cle_0-9">清</li></ul></dd></dl>',
		bettips : '从万、千、百、十、个任两位选一个号码组成一注。',
		betexample : '投注方案：**4*6；开奖号码：**4*6',
		bethelp : '玩法：从任意2位上至少各选1个号码，所选号码与开奖号码的对应位相同，且顺序一致，即为中奖。',
		formatBalls : function(balls) {
			return formatBall(balls['w'])+','+formatBall(balls['q'])+','+
				formatBall(balls['b'])+','+formatBall(balls['s'])+','+formatBall(balls['g']);
		},
		vali : function() {

			var datasel = [ 'w', 'q', 'b', 's', 'g' ];
			var newsel = [];
			for (var i = 0; i < datasel.length; i++) {
				if (way.get(this.rulecode + ".count." + datasel[i])
						&& way.get(this.rulecode + ".count." + datasel[i]) > 0) {
					newsel.push(datasel[i]);
				}
			}

			if (newsel.length < 2) {
				way.set("Lottery.itemcount", "0");
				way.set("Lottery.total", "0");
			} else if (way.get("Lottery.times")) {

				var aPositionCombo = Lottery_Rule.getCombination(newsel, 2);
				var nums = 0;
				var iComboLen = aPositionCombo.length;
				var aCombo = [];
				var iLen = 0;
				var tmpNums = 1;
				for (j = 0; j < iComboLen; j++) {

					aCombo = aPositionCombo[j].split(",");
					iLen = aCombo.length;
					tmpNums = 1;
					for (h = 0; h < iLen; h++) {
						tmpNums *= way.get(this.rulecode + ".count."
								+ aCombo[h]);
					}
					nums += tmpNums
				}

				var itemcount = nums;
				way.set("Lottery.itemcount", ""+itemcount);
				var total = itemcount * way.get("Lottery.times")
						* way.get("http://www.yugj881.com/resources/main/lottery/Lottery.yjf") * Env.price;
				if (total)
					way.set("Lottery.total", total.toFixed(4));
				else
					way.set("Lottery.total", "0");
			} else {
				way.set("Lottery.total", "0");
			}
		},
		clear : function() {
			var ss = [ "w", "q", "b", "s", "g" ];
			for (k = 0; k < 5; k++)
				for (i = 0; i <= 9; i++) {
					var item = $("#rx2fs_" + ss[k] + "_" + i);
					if (item.hasClass("cur")) {
						item.trigger('click');
					}
				}
		}
	},
	"rx2ds" : {
		showname : '任二单式',
		rulecode : 'rx2ds',
		realname : '[任选_任二单式]',
		maxMultiplePerOrder : -1,
		maxPrize : -1,
		maxRecord : -1,
		isPlaces:true,
		fixed : 10,
		minMode : 1850,
		calculatePrize : Env.defaultCalculate,
		bettips : '手动输入号码，至少输入1个两位数号码组成一注。并选择对应位',
		betexample : '投注方案：***45； 选择对应位：十、个，开奖号码：***45，即为中奖',
		bethelp : '玩法：手动输入一个2位数号码组成一注，所选号码与开奖号码的对应位相同，且顺序一致，即为中奖。',
		textarea : {},
		vali : function(k) {
			var itemcount = 0;
			if (way.get("Lottery.context")) {
				var v = way.get("Lottery.context");
				var reg = /\b[0-9]{2}\b/g;
				// 去重复
				var sszz = util_unique(v, reg);
				sszz = sszz.sort();
				if (sszz) {
					itemcount = sszz.length;
					way.set("Lottery.contexts", sszz);
				}
			}

			if (way.get("Lottery.count.places")
					&& way.get("Lottery.count.places") >= 2) {
				if (way.get("Lottery.count.places") == 5) {
					itemcount = itemcount * 10;
				} else if (way.get("Lottery.count.places") == 4) {
					itemcount = itemcount * 6;
				} else if (way.get("Lottery.count.places") == 3) {
					itemcount = itemcount * 3;
				}
			} else {
				way.set("Lottery.itemcount", "0");
				way.set("Lottery.total", "0");
				return;
			}

			if (way.get("Lottery.times")) {
				if (itemcount)
					way.set("Lottery.itemcount", ""+itemcount);
				else
					way.set("Lottery.itemcount", "0");
				var total = itemcount * way.get("Lottery.times")
						* way.get("http://www.yugj881.com/resources/main/lottery/Lottery.yjf") * Env.price;
				if (total)
					way.set("Lottery.total", total.toFixed(4));
				else
					way.set("Lottery.total", "0");
			} else {
				way.set("Lottery.itemcount", "0");
				way.set("Lottery.total", "0");
			}
		},
		changeContext : function(e) {
			var k = String.fromCharCode(e.which);
			if (isNaN(parseInt(k))) {
				if (k != ' ' && k != ',' && k != ';')
					e.returnValue = false;
			}
		},
		clear : function() {
			way.set("Lottery.context", "");
		}
	},
	"rx2zx" : {
		showname : '任二组选',
		rulecode : 'rx2zx',
		realname : '[任选_任二组选]',
		maxMultiplePerOrder : -1,
		maxPrize : -1,
		maxRecord : -1,
		
		fixed : 20,
		minMode : 1850,
		calculatePrize : Env.defaultCalculate,
		pageHtml :'<dl class="danqiu" id="rx2zx"><dd>'
			+ '<ul class="sz-qiu"><li id="rx2zx_places_0">万位</li><li id="rx2zx_places_1">千位</li>'
			+'<li id="rx2zx_places_2">百位</li><li id="rx2zx_places_3">十位</li><li id="rx2zx_places_4">个位</li></ul></dd>'
			+'<dd><h5>任二组选</h5>'
			+ '<ul class="sz-qiu"><li  id="rx2zx_zu_0">0</li><li id="rx2zx_zu_1">1</li><li id="rx2zx_zu_2">2</li>'
			+'<li id="rx2zx_zu_3">3</li><li id="rx2zx_zu_4">4</li><li id="rx2zx_zu_5">5</li><li id="rx2zx_zu_6">6</li>'
			+'<li id="rx2zx_zu_7">7</li><li id="rx2zx_zu_8">8</li><li id="rx2zx_zu_9">9</li></ul>'
			+ '<ul class="gongn"><li datascope="rx2zx_zu_ful_0-9">全</li><li datascope="rx2zx_zu_big_0-9">大</li><li datascope="rx2zx_zu_sma_0-9">小</li>'
			+'<li datascope="rx2zx_zu_sin_0-9">单</li><li datascope="rx2zx_zu_dou_0-9">双</li><li datascope="rx2zx_zu_cle_0-9">清</li></ul></dd></dl>',
		bettips : '至少选择两个号码组成一注，并选择两个对应位。',
		betexample : '投注方案：选择12,对应位百、十，开奖为**21* 或 **12*，即为中奖。',
		bethelp : '玩法：从0-9中选2个号码组成一注，所择号码与开奖号码的对应位相同，顺序不限，即为中奖。',
		formatBalls : function(balls) {
			return formatBall(balls['places'], true)+','+formatBall(balls['zu']);
		},
		vali : function() {
			if (!way.get(this.rulecode + ".count.zu")
					|| way.get(this.rulecode + ".count.zu") < 2
					|| !way.get(this.rulecode + ".count.places")||
					way.get(this.rulecode + ".count.places")<2) {
				way.set("Lottery.itemcount", "0");
				way.set("Lottery.total", "0");
			} else if (way.get("Lottery.times")) {
				var itemcount = way.get(this.rulecode + ".count.zu");
				var places = way.get(this.rulecode + ".count.places");
				places = places*(places-1)/2;
				itemcount = places*itemcount * (itemcount - 1) / 2;
				way.set("Lottery.itemcount", ""+itemcount);
				var total = itemcount * way.get("Lottery.times")
						* way.get("http://www.yugj881.com/resources/main/lottery/Lottery.yjf") * Env.price;
				if (total)
					way.set("Lottery.total", total.toFixed(4));
				else
					way.set("Lottery.total", "0");
			} else {
				way.set("Lottery.total", "0");
			}
		},
		clear : function() {
			var ss = [ "places" , "zu" ];
			for (k = 0; k < ss.length; k++)
				for (i = 0; i <= 9; i++) {
					var item = $("#rx2zx_" + ss[k] + "_" + i);
					if (item.hasClass("cur")) {
						item.trigger('click');
					}
				}
		}
	},

	"zhixhzqs" : {
		showname : '和值',
		rulecode : 'zhixhzqs',
		realname : '[前三_直选和值]',
		maxMultiplePerOrder : -1,
		maxPrize : -1,
		maxRecord : -1,
		
		fixed : 2,
		minMode : 1850,
		startPrice : 1800,
		calculatePrize : Env.defaultCalculate,
		pageHtml :'<dl class="duoqiu" id="zhixhzqs">'
			+'<dd><h5>前三直选</h5>'
			+ '<ul class="sz-qiu"><li id="zhixhzqs_zu_00">0</li><li id="zhixhzqs_zu_01">1</li><li id="zhixhzqs_zu_02">2</li>'
			+'<li id="zhixhzqs_zu_03">3</li><li id="zhixhzqs_zu_04">4</li><li id="zhixhzqs_zu_05">5</li><li id="zhixhzqs_zu_06">6</li>'
			+'<li id="zhixhzqs_zu_07">7</li><li id="zhixhzqs_zu_08">8</li><li id="zhixhzqs_zu_09">9</li>'
			+'<li id="zhixhzqs_zu_10">10</li><li id="zhixhzqs_zu_11">11</li><li id="zhixhzqs_zu_12">12</li>'
			+'<li id="zhixhzqs_zu_13">13</li><li id="zhixhzqs_zu_14">14</li><li id="zhixhzqs_zu_15">15</li>'
			+'<li id="zhixhzqs_zu_16">16</li><li id="zhixhzqs_zu_17">17</li><li id="zhixhzqs_zu_18">18</li>'
			+'<li id="zhixhzqs_zu_19">19</li><li id="zhixhzqs_zu_20">20</li><li id="zhixhzqs_zu_21">21</li>'
			+'<li id="zhixhzqs_zu_22">22</li><li id="zhixhzqs_zu_23">23</li><li id="zhixhzqs_zu_24">24</li>'
			+'<li id="zhixhzqs_zu_25">25</li><li id="zhixhzqs_zu_26">26</li><li id="zhixhzqs_zu_27">27</li></ul>'
			+ '<ul class="gongn"><li datascope="zhixhzqs_zu_ful_0-27">全</li><li datascope="zhixhzqs_zu_big_0-27">大</li><li datascope="zhixhzqs_zu_sma_0-27">小</li>'
			+'<li datascope="zhixhzqs_zu_sin_0-27">单</li><li datascope="zhixhzqs_zu_dou_0-27">双</li><li datascope="zhixhzqs_zu_cle_0-27">清</li></ul></dd></dl>',
		bettips : '至少选择一个号码组成一注。',
		betexample : '投注方案：选择12, 等于开奖号前三位3,4,5的和值，即为中奖。',
		bethelp : '玩法：选择0-27，若所选号码与开奖号前三位的和值相等，即中奖。',
		vali : function() {
			if (!way.get(this.rulecode + ".count.zu")) {
				way.set("Lottery.itemcount", "0");
				way.set("Lottery.total", "0");
			} else if (way.get("Lottery.times")) {

				var itemcount = 0;
				var vballs = way.get(this.rulecode + ".balls.zu");
				for (j = 0; j < vballs.length; j++) {
					if (vballs[j] != "" && !isNaN(vballs[j])) {
						itemcount += arrzxhz[parseInt(vballs[j])];
					}
				}

				way.set("Lottery.itemcount", ""+itemcount);
				var total = itemcount * way.get("Lottery.times")
						* way.get("http://www.yugj881.com/resources/main/lottery/Lottery.yjf") * Env.price;
				if (total)
					way.set("Lottery.total", total.toFixed(4));
				else
					way.set("Lottery.total", "0");
			} else {
				way.set("Lottery.total", "0");
			}
		},
		clear : function() {
			var ss = [ "zu" ];
			var vp = "_";
			for (k = 0; k < 1; k++)
				for (i = 0; i <= 27; i++) {
					if (i < 10) {
						vp = "_0";
					} else {
						vp = "_";
					}
					var item = $("#zhixhzqs_" + ss[k] + vp + i);
					if (item.hasClass("cur")) {
						item.trigger('click');
					}
				}
		}
	},
	"zuxhzqs" : {
		showname : '和值',
		rulecode : 'zuxhzqs',
		realname : '[前三_组选和值]',
		maxMultiplePerOrder : -1,
		maxPrize : -1,
		maxRecord : -1,
		
		fixed : 2,
		minMode : 1850,
		startPrice : 600,
		s_fixed : 2,
		calculatePrize : Env.defaultCalculate,
		pageHtml :'<dl class="duoqiu" id="zuxhzqs">'
			+'<dd><h5>前三组选</h5>'
			+ '<ul class="sz-qiu"><li id="zuxhzqs_zu_01">1</li><li id="zuxhzqs_zu_02">2</li>'
			+'<li id="zuxhzqs_zu_03">3</li><li id="zuxhzqs_zu_04">4</li><li id="zuxhzqs_zu_05">5</li><li id="zuxhzqs_zu_06">6</li>'
			+'<li id="zuxhzqs_zu_07">7</li><li id="zuxhzqs_zu_08">8</li><li id="zuxhzqs_zu_09">9</li>'
			+'<li id="zuxhzqs_zu_10">10</li><li id="zuxhzqs_zu_11">11</li><li id="zuxhzqs_zu_12">12</li>'
			+'<li id="zuxhzqs_zu_13">13</li><li id="zuxhzqs_zu_14">14</li><li id="zuxhzqs_zu_15">15</li>'
			+'<li id="zuxhzqs_zu_16">16</li><li id="zuxhzqs_zu_17">17</li><li id="zuxhzqs_zu_18">18</li>'
			+'<li id="zuxhzqs_zu_19">19</li><li id="zuxhzqs_zu_20">20</li><li id="zuxhzqs_zu_21">21</li>'
			+'<li id="zuxhzqs_zu_22">22</li><li id="zuxhzqs_zu_23">23</li><li id="zuxhzqs_zu_24">24</li>'
			+'<li id="zuxhzqs_zu_25">25</li><li id="zuxhzqs_zu_26">26</li></ul>'
			+ '<ul class="gongn"><li datascope="zuxhzqs_zu_ful_1-26">全</li><li datascope="zuxhzqs_zu_big_1-26">大</li><li datascope="zuxhzqs_zu_sma_1-26">小</li>'
			+'<li datascope="zuxhzqs_zu_sin_1-26">单</li><li datascope="zuxhzqs_zu_dou_1-26">双</li><li datascope="zuxhzqs_zu_cle_1-26">清</li></ul></dd></dl>',
		bettips : '至少选择一个号码组成一注。',
		betexample : '投注方案：选择12, 等于开奖号前三位3,4,5的和值，即为中奖。',
		bethelp : '玩法：选择1-26，若所选号码与开奖号前三位的和值相等（前三号码符合组三组六规则），即中奖。',
		vali : function() {
			if (!way.get(this.rulecode + ".count.zu")) {
				way.set("Lottery.itemcount", "0");
				way.set("Lottery.total", "0");
			} else if (way.get("Lottery.times")) {
				
				var itemcount = 0;
				var vballs = way.get(this.rulecode + ".balls.zu");
				
				for (j = 0; j < vballs.length; j++) {
					if (vballs[j] != "" && !isNaN(vballs[j])) {
						itemcount += parseInt(arrzuxhz[parseInt(vballs[j]) - 1]);
					}
				}
				way.set("Lottery.itemcount", ""+itemcount);
				var total = itemcount * way.get("Lottery.times")
						* way.get("http://www.yugj881.com/resources/main/lottery/Lottery.yjf") * Env.price;
				if (total)
					way.set("Lottery.total", total.toFixed(4));
				else
					way.set("Lottery.total", "0");
			} else {
				way.set("Lottery.total", "0");
			}
		},
		clear : function() {
			var ss = [ "zu" ];
			var vp = "_";
			for (k = 0; k < 1; k++)
				for (i = 1; i <= 26; i++) {
					if (i < 10) {
						vp = "_0";
					} else {
						vp = "_";
					}
					var item = $("#zuxhzqs_" + ss[k] + vp + i);
					if (item.hasClass("cur")) {
						item.trigger('click');
					}
				}
		}
	},
	"hzwsqs" : {
		showname : '和值',
		rulecode : 'hzwsqs',
		realname : '[前三_和值尾数]',
		maxMultiplePerOrder : -1,
		maxPrize : -1,
		maxRecord : -1,
		
		fixed : 0.02,
		minMode : 1850,
		startPrice : 18,
		calculatePrize : Env.defaultCalculate,
		pageHtml :'<dl class="danqiu" id="hzwsqs">'
			+'<dd><h5>前三尾数</h5>'
			+ '<ul class="sz-qiu"><li id="hzwsqs_zu_0">0</li><li id="hzwsqs_zu_1">1</li><li id="hzwsqs_zu_2">2</li>'
			+'<li id="hzwsqs_zu_3">3</li><li id="hzwsqs_zu_4">4</li><li id="hzwsqs_zu_5">5</li><li id="hzwsqs_zu_6">6</li>'
			+'<li id="hzwsqs_zu_7">7</li><li id="hzwsqs_zu_8">8</li><li id="hzwsqs_zu_9">9</li></ul>'
			+ '<ul class="gongn"><li datascope="hzwsqs_zu_ful_0-9">全</li><li datascope="hzwsqs_zu_big_0-9">大</li><li datascope="hzwsqs_zu_sma_0-9">小</li>'
			+'<li datascope="hzwsqs_zu_sin_0-9">单</li><li datascope="hzwsqs_zu_dou_0-9">双</li><li datascope="hzwsqs_zu_cle_0-9">清</li></ul></dd></dl>',
		bettips : '至少选择一个号码组成一注。',
		betexample : '投注方案：选择5, 等于开奖号前三位4,5,6和值的尾数，即为中奖。',
		bethelp : '玩法：选择0-9，若所选号码与开奖号前三位的和值的尾数相等，即中奖。',
		vali : function() {
			if (!way.get(this.rulecode + ".count.zu")) {
				way.set("Lottery.itemcount", "0");
				way.set("Lottery.total", "0");
			} else if (way.get("Lottery.times")) {

				var itemcount = way.get(this.rulecode + ".count.zu");
				way.set("Lottery.itemcount", ""+itemcount);
				var total = itemcount * way.get("Lottery.times")
						* way.get("http://www.yugj881.com/resources/main/lottery/Lottery.yjf") * Env.price;
				if (total)
					way.set("Lottery.total", total.toFixed(4));
				else
					way.set("Lottery.total", "0");
			} else {
				way.set("Lottery.total", "0");
			}
		},
		clear : function() {
			var ss = [ "zu" ];
			for (k = 0; k < 1; k++)
				for (i = 0; i <= 9; i++) {
					var item = $("#hzwsqs_" + ss[k] + "_" + i);
					if (item.hasClass("cur")) {
						item.trigger('click');
					}
				}
		}
	},
	"zhixhzzs" : {
		showname : '和值',
		rulecode : 'zhixhzzs',
		realname : '[中三_直选和值]',
		maxMultiplePerOrder : -1,
		maxPrize : -1,
		maxRecord : -1,
		
		fixed : 2,
		minMode : 1850,
		startPrice : 1800,
		calculatePrize : Env.defaultCalculate,
		pageHtml :'<dl class="duoqiu" id="zhixhzzs">'
			+'<dd><h5>中三直选</h5>'
			+ '<ul class="sz-qiu"><li id="zhixhzzs_zu_00">0</li><li id="zhixhzzs_zu_01">1</li><li id="zhixhzzs_zu_02">2</li>'
			+'<li id="zhixhzzs_zu_03">3</li><li id="zhixhzzs_zu_04">4</li><li id="zhixhzzs_zu_05">5</li><li id="zhixhzzs_zu_06">6</li>'
			+'<li id="zhixhzzs_zu_07">7</li><li id="zhixhzzs_zu_08">8</li><li id="zhixhzzs_zu_09">9</li>'
			+'<li id="zhixhzzs_zu_10">10</li><li id="zhixhzzs_zu_11">11</li><li id="zhixhzzs_zu_12">12</li>'
			+'<li id="zhixhzzs_zu_13">13</li><li id="zhixhzzs_zu_14">14</li><li id="zhixhzzs_zu_15">15</li>'
			+'<li id="zhixhzzs_zu_16">16</li><li id="zhixhzzs_zu_17">17</li><li id="zhixhzzs_zu_18">18</li>'
			+'<li id="zhixhzzs_zu_19">19</li><li id="zhixhzzs_zu_20">20</li><li id="zhixhzzs_zu_21">21</li>'
			+'<li id="zhixhzzs_zu_22">22</li><li id="zhixhzzs_zu_23">23</li><li id="zhixhzzs_zu_24">24</li>'
			+'<li id="zhixhzzs_zu_25">25</li><li id="zhixhzzs_zu_26">26</li><li id="zhixhzzs_zu_27">27</li></ul>'
			+ '<ul class="gongn"><li datascope="zhixhzzs_zu_ful_0-27">全</li><li datascope="zhixhzzs_zu_big_0-27">大</li><li datascope="zhixhzzs_zu_sma_0-27">小</li>'
			+'<li datascope="zhixhzzs_zu_sin_0-27">单</li><li datascope="zhixhzzs_zu_dou_0-27">双</li><li datascope="zhixhzzs_zu_cle_0-27">清</li></ul></dd></dl>',
		bettips : '至少选择一个号码组成一注。',
		betexample : '投注方案：选择12, 等于开奖号中三位3,4,5和值，即为中奖。',
		bethelp : '玩法：选择0-27，若所选号码与开奖号中三位的和值相等，即中奖。',
		vali : function() {
			if (!way.get(this.rulecode + ".count.zu")) {
				way.set("Lottery.itemcount", "0");
				way.set("Lottery.total", "0");
			} else if (way.get("Lottery.times")) {

				var itemcount = 0;
				var vballs = way.get(this.rulecode + ".balls.zu");
				for (j = 0; j < vballs.length; j++) {
					if (vballs[j] != "" && !isNaN(vballs[j])) {
						itemcount += arrzxhz[parseInt(vballs[j])];
					}
				}

				way.set("Lottery.itemcount", ""+itemcount);
				var total = itemcount * way.get("Lottery.times")
						* way.get("http://www.yugj881.com/resources/main/lottery/Lottery.yjf") * Env.price;
				if (total)
					way.set("Lottery.total", total.toFixed(4));
				else
					way.set("Lottery.total", "0");
			} else {
				way.set("Lottery.total", "0");
			}
		},
		clear : function() {
			var ss = [ "zu" ];
			var vp = "_";
			for (k = 0; k < 1; k++)
				for (i = 0; i <= 27; i++) {
					if (i < 10) {
						vp = "_0";
					} else {
						vp = "_";
					}
					var item = $("#zhixhzzs_" + ss[k] + vp + i);
					if (item.hasClass("cur")) {
						item.trigger('click');
					}
				}
		}
	},
	"zuxhzzs" : {
		showname : '和值',
		rulecode : 'zuxhzzs',
		realname : '[中三_组选和值]',
		maxMultiplePerOrder : -1,
		maxPrize : -1,
		maxRecord : -1,
		
		fixed : 2,
		minMode : 1850,
		startPrice : 600,
		s_fixed : 2,
		calculatePrize : Env.defaultCalculate,
		pageHtml :'<dl class="duoqiu" id="zuxhzzs">'
			+'<dd><h5>中三组选</h5>'
			+ '<ul class="sz-qiu"><li id="zuxhzzs_zu_01">1</li><li id="zuxhzzs_zu_02">2</li>'
			+'<li id="zuxhzzs_zu_03">3</li><li id="zuxhzzs_zu_04">4</li><li id="zuxhzzs_zu_05">5</li><li id="zuxhzzs_zu_06">6</li>'
			+'<li id="zuxhzzs_zu_07">7</li><li id="zuxhzzs_zu_08">8</li><li id="zuxhzzs_zu_09">9</li>'
			+'<li id="zuxhzzs_zu_10">10</li><li id="zuxhzzs_zu_11">11</li><li id="zuxhzzs_zu_12">12</li>'
			+'<li id="zuxhzzs_zu_13">13</li><li id="zuxhzzs_zu_14">14</li><li id="zuxhzzs_zu_15">15</li>'
			+'<li id="zuxhzzs_zu_16">16</li><li id="zuxhzzs_zu_17">17</li><li id="zuxhzzs_zu_18">18</li>'
			+'<li id="zuxhzzs_zu_19">19</li><li id="zuxhzzs_zu_20">20</li><li id="zuxhzzs_zu_21">21</li>'
			+'<li id="zuxhzzs_zu_22">22</li><li id="zuxhzzs_zu_23">23</li><li id="zuxhzzs_zu_24">24</li>'
			+'<li id="zuxhzzs_zu_25">25</li><li id="zuxhzzs_zu_26">26</li></ul>'
			+ '<ul class="gongn"><li datascope="zuxhzzs_zu_ful_1-26">全</li><li datascope="zuxhzzs_zu_big_1-26">大</li><li datascope="zuxhzzs_zu_sma_1-26">小</li>'
			+'<li datascope="zuxhzzs_zu_sin_1-26">单</li><li datascope="zuxhzzs_zu_dou_1-26">双</li><li datascope="zuxhzzs_zu_cle_1-26">清</li></ul></dd></dl>',
		bettips : '至少选择一个号码组成一注。',
		betexample : '投注方案：选择12, 等于开奖号中三位3,4,5和值，即为中奖。',
		bethelp : '玩法：选择1-26，若所选号码与开奖号中三位的和值相等（中三号码符合组三组六规则），即中奖。',
		vali : function() {
			if (!way.get(this.rulecode + ".count.zu")) {
				way.set("Lottery.itemcount", "0");
				way.set("Lottery.total", "0");
			} else if (way.get("Lottery.times")) {

				var itemcount = 0;
				var vballs = way.get(this.rulecode + ".balls.zu");
				for (j = 0; j < vballs.length; j++) {
					if (vballs[j] != "" && !isNaN(vballs[j])) {
						itemcount += arrzuxhz[parseInt(vballs[j]) - 1];
					}
				}

				way.set("Lottery.itemcount", ""+itemcount);
				var total = itemcount * way.get("Lottery.times")
						* way.get("http://www.yugj881.com/resources/main/lottery/Lottery.yjf") * Env.price;
				if (total)
					way.set("Lottery.total", total.toFixed(4));
				else
					way.set("Lottery.total", "0");
			} else {
				way.set("Lottery.total", "0");
			}
		},
		clear : function() {
			var ss = [ "zu" ];
			var vp = "_";
			for (k = 0; k < 1; k++)
				for (i = 1; i <= 26; i++) {
					if (i < 10) {
						vp = "_0";
					} else {
						vp = "_";
					}
					var item = $("#zuxhzzs_" + ss[k] + vp + i);
					if (item.hasClass("cur")) {
						item.trigger('click');
					}
				}
		}
	},
	"hzwszs" : {
		showname : '和值',
		rulecode : 'hzwszs',
		realname : '[中三_和值尾数]',
		maxMultiplePerOrder : -1,
		maxPrize : -1,
		maxRecord : -1,
		
		fixed : 0.02,
		minMode : 1850,
		startPrice : 18,
		calculatePrize : Env.defaultCalculate,
		pageHtml :'<dl class="danqiu" id="hzwszs">'
			+'<dd><h5>中三尾数</h5>'
			+ '<ul class="sz-qiu"><li id="hzwszs_zu_0">0</li><li id="hzwszs_zu_1">1</li><li id="hzwszs_zu_2">2</li>'
			+'<li id="hzwszs_zu_3">3</li><li id="hzwszs_zu_4">4</li><li id="hzwszs_zu_5">5</li><li id="hzwszs_zu_6">6</li>'
			+'<li id="hzwszs_zu_7">7</li><li id="hzwszs_zu_8">8</li><li id="hzwszs_zu_9">9</li></ul>'
			+ '<ul class="gongn"><li datascope="hzwszs_zu_ful_0-9">全</li><li datascope="hzwszs_zu_big_0-9">大</li><li datascope="hzwszs_zu_sma_0-9">小</li>'
			+'<li datascope="hzwszs_zu_sin_0-9">单</li><li datascope="hzwszs_zu_dou_0-9">双</li><li datascope="hzwszs_zu_cle_0-9">清</li></ul></dd></dl>',
		bettips : '至少选择一个号码组成一注。',
		betexample : '投注方案：选择5, 等于开奖号中三位4,5,6和值的尾数，即为中奖。',
		bethelp : '玩法：选择0-9，若所选号码与开奖号中三位的和值的尾数相等，即中奖。',
		vali : function() {
			if (!way.get(this.rulecode + ".count.zu")) {
				way.set("Lottery.itemcount", "0");
				way.set("Lottery.total", "0");
			} else if (way.get("Lottery.times")) {

				var itemcount = way.get(this.rulecode + ".count.zu");
				way.set("Lottery.itemcount", ""+itemcount);
				var total = itemcount * way.get("Lottery.times")
						* way.get("http://www.yugj881.com/resources/main/lottery/Lottery.yjf") * Env.price;
				if (total)
					way.set("Lottery.total", total.toFixed(4));
				else
					way.set("Lottery.total", "0");
			} else {
				way.set("Lottery.total", "0");
			}
		},
		clear : function() {
			var ss = [ "zu" ];
			for (k = 0; k < 1; k++)
				for (i = 0; i <= 9; i++) {
					var item = $("#hzwszs_" + ss[k] + "_" + i);
					if (item.hasClass("cur")) {
						item.trigger('click');
					}
				}
		}
	},
	"zhixhzhs" : {
		showname : '和值',
		rulecode : 'zhixhzhs',
		realname : '[后三_直选和值]',
		maxMultiplePerOrder : -1,
		maxPrize : -1,
		maxRecord : -1,
		
		fixed : 2,
		minMode : 1850,
		startPrice : 1800,
		calculatePrize : Env.defaultCalculate,
		pageHtml :'<dl class="duoqiu" id="zhixhzhs">'
			+'<dd><h5>后三直选</h5>'
			+ '<ul class="sz-qiu"><li id="zhixhzhs_zu_00">0</li><li id="zhixhzhs_zu_01">1</li><li id="zhixhzhs_zu_02">2</li>'
			+'<li id="zhixhzhs_zu_03">3</li><li id="zhixhzhs_zu_04">4</li><li id="zhixhzhs_zu_05">5</li><li id="zhixhzhs_zu_06">6</li>'
			+'<li id="zhixhzhs_zu_07">7</li><li id="zhixhzhs_zu_08">8</li><li id="zhixhzhs_zu_09">9</li>'
			+'<li id="zhixhzhs_zu_10">10</li><li id="zhixhzhs_zu_11">11</li><li id="zhixhzhs_zu_12">12</li>'
			+'<li id="zhixhzhs_zu_13">13</li><li id="zhixhzhs_zu_14">14</li><li id="zhixhzhs_zu_15">15</li>'
			+'<li id="zhixhzhs_zu_16">16</li><li id="zhixhzhs_zu_17">17</li><li id="zhixhzhs_zu_18">18</li>'
			+'<li id="zhixhzhs_zu_19">19</li><li id="zhixhzhs_zu_20">20</li><li id="zhixhzhs_zu_21">21</li>'
			+'<li id="zhixhzhs_zu_22">22</li><li id="zhixhzhs_zu_23">23</li><li id="zhixhzhs_zu_24">24</li>'
			+'<li id="zhixhzhs_zu_25">25</li><li id="zhixhzhs_zu_26">26</li><li id="zhixhzhs_zu_27">27</li></ul>'
			+ '<ul class="gongn"><li datascope="zhixhzhs_zu_ful_0-27">全</li><li datascope="zhixhzhs_zu_big_0-27">大</li><li datascope="zhixhzhs_zu_sma_0-27">小</li>'
			+'<li datascope="zhixhzhs_zu_sin_0-27">单</li><li datascope="zhixhzhs_zu_dou_0-27">双</li><li datascope="zhixhzhs_zu_cle_0-27">清</li></ul></dd></dl>',
		bettips : '至少选择一个号码组成一注。',
		betexample : '投注方案：选择12, 等于开奖号后三位3,4,5的和值，即为中奖。',
		bethelp : '玩法：选择0-27，若所选号码与开奖号后三位的和值相等，即中奖。',
		vali : function() {
			if (!way.get(this.rulecode + ".count.zu")) {
				way.set("Lottery.itemcount", "0");
				way.set("Lottery.total", "0");
			} else if (way.get("Lottery.times")) {

				var itemcount = 0;
				var vballs = way.get(this.rulecode + ".balls.zu");
				for (j = 0; j < vballs.length; j++) {
					if (vballs[j] != "" && !isNaN(vballs[j])) {
						itemcount += arrzxhz[parseInt(vballs[j])];
					}
				}

				way.set("Lottery.itemcount", ""+itemcount);
				var total = itemcount * way.get("Lottery.times")
						* way.get("http://www.yugj881.com/resources/main/lottery/Lottery.yjf") * Env.price;
				if (total)
					way.set("Lottery.total", total.toFixed(4));
				else
					way.set("Lottery.total", "0");
			} else {
				way.set("Lottery.total", "0");
			}
		},
		clear : function() {
			var ss = [ "zu" ];
			var vp = "_";
			for (k = 0; k < 1; k++)
				for (i = 0; i <= 27; i++) {
					if (i < 10) {
						vp = "_0";
					} else {
						vp = "_";
					}
					var item = $("#zhixhzhs_" + ss[k] + vp + i);
					if (item.hasClass("cur")) {
						item.trigger('click');
					}
				}
		}
	},
	"zuxhzhs" : {
		showname : '和值',
		rulecode : 'zuxhzhs',
		realname : '[后三_组选和值]',
		maxMultiplePerOrder : -1,
		maxPrize : -1,
		maxRecord : -1,
		
		fixed : 2,
		minMode : 1850,
		startPrice : 600,
		s_fixed : 2,
		calculatePrize : Env.defaultCalculate,
		pageHtml :'<dl class="duoqiu" id="zuxhzhs">'
			+'<dd><h5>后三组选</h5>'
			+ '<ul class="sz-qiu"><li id="zuxhzhs_zu_01">1</li><li id="zuxhzhs_zu_02">2</li>'
			+'<li id="zuxhzhs_zu_03">3</li><li id="zuxhzhs_zu_04">4</li><li id="zuxhzhs_zu_05">5</li><li id="zuxhzhs_zu_06">6</li>'
			+'<li id="zuxhzhs_zu_07">7</li><li id="zuxhzhs_zu_08">8</li><li id="zuxhzhs_zu_09">9</li>'
			+'<li id="zuxhzhs_zu_10">10</li><li id="zuxhzhs_zu_11">11</li><li id="zuxhzhs_zu_12">12</li>'
			+'<li id="zuxhzhs_zu_13">13</li><li id="zuxhzhs_zu_14">14</li><li id="zuxhzhs_zu_15">15</li>'
			+'<li id="zuxhzhs_zu_16">16</li><li id="zuxhzhs_zu_17">17</li><li id="zuxhzhs_zu_18">18</li>'
			+'<li id="zuxhzhs_zu_19">19</li><li id="zuxhzhs_zu_20">20</li><li id="zuxhzhs_zu_21">21</li>'
			+'<li id="zuxhzhs_zu_22">22</li><li id="zuxhzhs_zu_23">23</li><li id="zuxhzhs_zu_24">24</li>'
			+'<li id="zuxhzhs_zu_25">25</li><li id="zuxhzhs_zu_26">26</li></ul>'
			+ '<ul class="gongn"><li datascope="zuxhzhs_zu_ful_1-26">全</li><li datascope="zuxhzhs_zu_big_1-26">大</li><li datascope="zuxhzhs_zu_sma_1-26">小</li>'
			+'<li datascope="zuxhzhs_zu_sin_1-26">单</li><li datascope="zuxhzhs_zu_dou_1-26">双</li><li datascope="zuxhzhs_zu_cle_1-26">清</li></ul></dd></dl>',
		bettips : '至少选择一个号码组成一注。',
		betexample : '投注方案：选择12, 等于开奖号后三位3,4,5的和值，即为中奖。',
		bethelp : '玩法：选择1-26，若所选号码与开奖号后三位的和值相等（后三号码符合组三组六规则），即中奖。',
		vali : function() {
			if (!way.get(this.rulecode + ".count.zu")) {
				way.set("Lottery.itemcount", "0");
				way.set("Lottery.total", "0");
			} else if (way.get("Lottery.times")) {

				var itemcount = 0;
				var vballs = way.get(this.rulecode + ".balls.zu");
				for (j = 0; j < vballs.length; j++) {
					if (vballs[j] != "" && !isNaN(vballs[j])) {
						itemcount += arrzuxhz[parseInt(vballs[j]) - 1];
					}
				}

				way.set("Lottery.itemcount", ""+itemcount);
				var total = itemcount * way.get("Lottery.times")
						* way.get("http://www.yugj881.com/resources/main/lottery/Lottery.yjf") * Env.price;
				if (total)
					way.set("Lottery.total", total.toFixed(4));
				else
					way.set("Lottery.total", "0");
			} else {
				way.set("Lottery.total", "0");
			}
		},
		clear : function() {
			var ss = [ "zu" ];
			var vp = "_";
			for (k = 0; k < 1; k++)
				for (i = 1; i <= 26; i++) {
					if (i < 10) {
						vp = "_0";
					} else {
						vp = "_";
					}
					var item = $("#zuxhzhs_" + ss[k] + vp + i);
					if (item.hasClass("cur")) {
						item.trigger('click');
					}
				}
		}
	},
	"hzwshs" : {
		showname : '和值',
		rulecode : 'hzwshs',
		realname : '[后三_和值尾数]',
		maxMultiplePerOrder : -1,
		maxPrize : -1,
		maxRecord : -1,
		
		fixed : 0.02,
		minMode : 1850,
		startPrice : 18,
		calculatePrize : Env.defaultCalculate,
		pageHtml :'<dl class="danqiu" id="hzwshs">'
			+'<dd><h5>后三尾数</h5>'
			+ '<ul class="sz-qiu"><li id="hzwshs_zu_0">0</li><li id="hzwshs_zu_1">1</li><li id="hzwshs_zu_2">2</li>'
			+'<li id="hzwshs_zu_3">3</li><li id="hzwshs_zu_4">4</li><li id="hzwshs_zu_5">5</li><li id="hzwshs_zu_6">6</li>'
			+'<li id="hzwshs_zu_7">7</li><li id="hzwshs_zu_8">8</li><li id="hzwshs_zu_9">9</li></ul>'
			+ '<ul class="gongn"><li datascope="hzwshs_zu_ful_0-9">全</li><li datascope="hzwshs_zu_big_0-9">大</li><li datascope="hzwshs_zu_sma_0-9">小</li>'
			+'<li datascope="hzwshs_zu_sin_0-9">单</li><li datascope="hzwshs_zu_dou_0-9">双</li><li datascope="hzwshs_zu_cle_0-9">清</li></ul></dd></dl>',
		bettips : '至少选择一个号码组成一注。',
		betexample : '投注方案：选择5, 等于开奖号后三位4,5,6和值的尾数，即为中奖。',
		bethelp : '玩法：选择0-9，若所选号码与开奖号后三位的和值的尾数相等，即中奖。',
		vali : function() {
			if (!way.get(this.rulecode + ".count.zu")) {
				way.set("Lottery.itemcount", "0");
				way.set("Lottery.total", "0");
			} else if (way.get("Lottery.times")) {

				var itemcount = way.get(this.rulecode + ".count.zu");
				way.set("Lottery.itemcount", ""+itemcount);
				var total = itemcount * way.get("Lottery.times")
						* way.get("http://www.yugj881.com/resources/main/lottery/Lottery.yjf") * Env.price;
				if (total)
					way.set("Lottery.total", total.toFixed(4));
				else
					way.set("Lottery.total", "0");
			} else {
				way.set("Lottery.total", "0");
			}
		},
		clear : function() {
			var ss = [ "zu" ];
			for (k = 0; k < 1; k++)
				for (i = 0; i <= 9; i++) {
					var item = $("#hzwshs_" + ss[k] + "_" + i);
					if (item.hasClass("cur")) {
						item.trigger('click');
					}
				}
		}
	},
	"zhixhzqe" : {
		showname : '和值',
		rulecode : 'zhixhzqe',
		realname : '[前二_直选和值]',
		maxMultiplePerOrder : -1,
		maxPrize : -1,
		maxRecord : -1,
		
		fixed : 0.2,
		minMode : 1850,
		startPrice : 180,
		calculatePrize : Env.defaultCalculate,
		pageHtml :'<dl class="duoqiu" id="zhixhzqe">'
			+'<dd><h5>前二直选</h5>'
			+ '<ul class="sz-qiu"><li id="zhixhzqe_zu_00">0</li><li id="zhixhzqe_zu_01">1</li><li id="zhixhzqe_zu_02">2</li>'
			+'<li id="zhixhzqe_zu_03">3</li><li id="zhixhzqe_zu_04">4</li><li id="zhixhzqe_zu_05">5</li><li id="zhixhzqe_zu_06">6</li>'
			+'<li id="zhixhzqe_zu_07">7</li><li id="zhixhzqe_zu_08">8</li><li id="zhixhzqe_zu_09">9</li>'
			+'<li id="zhixhzqe_zu_10">10</li><li id="zhixhzqe_zu_11">11</li><li id="zhixhzqe_zu_12">12</li>'
			+'<li id="zhixhzqe_zu_13">13</li><li id="zhixhzqe_zu_14">14</li><li id="zhixhzqe_zu_15">15</li>'
			+'<li id="zhixhzqe_zu_16">16</li><li id="zhixhzqe_zu_17">17</li><li id="zhixhzqe_zu_18">18</li></ul>'
			+ '<ul class="gongn"><li datascope="zhixhzqe_zu_ful_0-18">全</li><li datascope="zhixhzqe_zu_big_0-18">大</li><li datascope="zhixhzqe_zu_sma_0-18">小</li>'
			+'<li datascope="zhixhzqe_zu_sin_0-18">单</li><li datascope="zhixhzqe_zu_dou_0-18">双</li><li datascope="zhixhzqe_zu_cle_0-18">清</li></ul></dd></dl>',
		bettips : '至少选择一个号码组成一注。',
		betexample : '投注方案：选择9, 等于开奖号前二位4,5的和值，即为中奖。',
		bethelp : '玩法：选择0-18，若所选号码与开奖号前二位的和值相等，即中奖。',
		vali : function() {
			if (!way.get(this.rulecode + ".count.zu")) {
				way.set("Lottery.itemcount", "0");
				way.set("Lottery.total", "0");
			} else if (way.get("Lottery.times")) {

				var itemcount = 0;
				var vballs = way.get(this.rulecode + ".balls.zu");
				for (j = 0; j < vballs.length; j++) {
					if (vballs[j] != "" && !isNaN(vballs[j])) {
						itemcount += arrzxhzex[parseInt(vballs[j])];
					}
				}

				way.set("Lottery.itemcount", ""+itemcount);
				var total = itemcount * way.get("Lottery.times")
						* way.get("http://www.yugj881.com/resources/main/lottery/Lottery.yjf") * Env.price;
				if (total)
					way.set("Lottery.total", total.toFixed(4));
				else
					way.set("Lottery.total", "0");
			} else {
				way.set("Lottery.total", "0");
			}
		},
		clear : function() {
			var ss = [ "zu" ];
			var vp = "_";
			for (k = 0; k < 1; k++)
				for (i = 0; i <= 18; i++) {
					if (i < 10) {
						vp = "_0";
					} else {
						vp = "_";
					}
					var item = $("#zhixhzqe_" + ss[k] + vp + i);
					if (item.hasClass("cur")) {
						item.trigger('click');
					}
				}
		}
	},
	"zhixhzhe" : {
		showname : '和值',
		rulecode : 'zhixhzhe',
		realname : '[后二_直选和值]',
		maxMultiplePerOrder : -1,
		maxPrize : -1,
		maxRecord : -1,
		
		fixed : 0.2,
		minMode : 1850,
		startPrice : 180,
		calculatePrize : Env.defaultCalculate,
		pageHtml :'<dl class="duoqiu" id="zhixhzhe">'
			+'<dd><h5>后二直选</h5>'
			+ '<ul class="sz-qiu"><li id="zhixhzhe_zu_00">0</li><li id="zhixhzhe_zu_01">1</li><li id="zhixhzhe_zu_02">2</li>'
			+'<li id="zhixhzhe_zu_03">3</li><li id="zhixhzhe_zu_04">4</li><li id="zhixhzhe_zu_05">5</li><li id="zhixhzhe_zu_06">6</li>'
			+'<li id="zhixhzhe_zu_07">7</li><li id="zhixhzhe_zu_08">8</li><li id="zhixhzhe_zu_09">9</li>'
			+'<li id="zhixhzhe_zu_10">10</li><li id="zhixhzhe_zu_11">11</li><li id="zhixhzhe_zu_12">12</li>'
			+'<li id="zhixhzhe_zu_13">13</li><li id="zhixhzhe_zu_14">14</li><li id="zhixhzhe_zu_15">15</li>'
			+'<li id="zhixhzhe_zu_16">16</li><li id="zhixhzhe_zu_17">17</li><li id="zhixhzhe_zu_18">18</li></ul>'
			+ '<ul class="gongn"><li datascope="zhixhzhe_zu_ful_0-18">全</li><li datascope="zhixhzhe_zu_big_0-18">大</li><li datascope="zhixhzhe_zu_sma_0-18">小</li>'
			+'<li datascope="zhixhzhe_zu_sin_0-18">单</li><li datascope="zhixhzhe_zu_dou_0-18">双</li><li datascope="zhixhzhe_zu_cle_0-18">清</li></ul></dd></dl>',
		bettips : '至少选择一个号码组成一注。',
		betexample : '投注方案：选择9, 等于开奖号后二位4,5的和值，即为中奖。',
		bethelp : '玩法：选择0-18，若所选号码与开奖号后二位的和值相等，即中奖。',
		vali : function() {
			if (!way.get(this.rulecode + ".count.zu")) {
				way.set("Lottery.itemcount", "0");
				way.set("Lottery.total", "0");
			} else if (way.get("Lottery.times")) {

				var itemcount = 0;
				var vballs = way.get(this.rulecode + ".balls.zu");
				for (j = 0; j < vballs.length; j++) {
					if (vballs[j] != "" && !isNaN(vballs[j])) {
						itemcount += arrzxhzex[parseInt(vballs[j])];
					}
				}

				way.set("Lottery.itemcount", ""+itemcount);
				var total = itemcount * way.get("Lottery.times")
						* way.get("http://www.yugj881.com/resources/main/lottery/Lottery.yjf") * Env.price;
				if (total)
					way.set("Lottery.total", total.toFixed(4));
				else
					way.set("Lottery.total", "0");
			} else {
				way.set("Lottery.total", "0");
			}
		},
		clear : function() {
			var ss = [ "zu" ];
			var vp = "_";
			for (k = 0; k < 1; k++)
				for (i = 0; i <= 18; i++) {
					if (i < 10) {
						vp = "_0";
					} else {
						vp = "_";
					}
					var item = $("#zhixhzhe_" + ss[k] + vp + i);
					if (item.hasClass("cur")) {
						item.trigger('click');
					}
				}
		}
	},

	"kuaduqs" : {
		showname : '跨度',
		rulecode : 'kuaduqs',
		realname : '[跨度_前三跨度]',
		maxMultiplePerOrder : -1,
		maxPrize : -1,
		maxRecord : -1,
		
		fixed : 2,
		minMode : 1850,
		startPrice : 1800,
		calculatePrize : Env.defaultCalculate,
		pageHtml :'<dl class="danqiu" id="kuaduqs"><dd><h5>前三跨度</h5>'
			+ '<ul class="sz-qiu"><li id="kuaduqs_zu_0">0</li><li id="kuaduqs_zu_1">1</li><li id="kuaduqs_zu_2">2</li>'
			+'<li id="kuaduqs_zu_3">3</li><li id="kuaduqs_zu_4">4</li><li id="kuaduqs_zu_5">5</li><li id="kuaduqs_zu_6">6</li>'
			+'<li id="kuaduqs_zu_7">7</li><li id="kuaduqs_zu_8">8</li><li id="kuaduqs_zu_9">9</li></ul>'
			+ '<ul class="gongn"><li datascope="kuaduqs_zu_ful_0-9">全</li><li datascope="kuaduqs_zu_big_0-9">大</li><li datascope="kuaduqs_zu_sma_0-9">小</li>'
			+'<li datascope="kuaduqs_zu_sin_0-9">单</li><li datascope="kuaduqs_zu_dou_0-9">双</li><li datascope="kuaduqs_zu_cle_0-9">清</li></ul></dd></dl>',
		bettips : '至少选择一个号码组成一注。',
		betexample : '投注方案：选择5, 等于开奖号前三位2,5,7的最大数7与最小数字2的差值，即为中奖。',
		bethelp : '玩法：选择0-9，若所选号码与开奖号前三位的最大最小数字的差值相等，即中奖。',
		vali : function() {
			if (!way.get(this.rulecode + ".count.zu")) {
				way.set("Lottery.itemcount", "0");
				way.set("Lottery.total", "0");
			} else if (way.get("Lottery.times")) {

				var itemcount = 0;
				var vballs = way.get(this.rulecode + ".balls.zu");
				for (j = 0; j < vballs.length; j++) {
					if (vballs[j] != "" && !isNaN(vballs[j])) {
						itemcount += arrkuadusx[parseInt(vballs[j])];
					}
				}

				way.set("Lottery.itemcount", ""+itemcount);
				var total = itemcount * way.get("Lottery.times")
						* way.get("http://www.yugj881.com/resources/main/lottery/Lottery.yjf") * Env.price;
				if (total)
					way.set("Lottery.total", total.toFixed(4));
				else
					way.set("Lottery.total", "0");
			} else {
				way.set("Lottery.total", "0");
			}
		},
		clear : function() {
			var ss = [ "zu" ];
			for (k = 0; k < 1; k++)
				for (i = 0; i <= 9; i++) {
					var item = $("#kuaduqs_" + ss[k] + "_" + i);
					if (item.hasClass("cur")) {
						item.trigger('click');
					}
				}
		}
	},
	"kuaduzs" : {
		showname : '跨度',
		rulecode : 'kuaduzs',
		realname : '[跨度_中三跨度]',
		maxMultiplePerOrder : -1,
		maxPrize : -1,
		maxRecord : -1,
		
		fixed : 2,
		minMode : 1850,
		startPrice : 1800,
		calculatePrize : Env.defaultCalculate,
		pageHtml :'<dl class="danqiu" id="kuaduzs"><dd><h5>中三跨度</h5>'
			+ '<ul class="sz-qiu"><li id="kuaduzs_zu_0">0</li><li id="kuaduzs_zu_1">1</li><li id="kuaduzs_zu_2">2</li>'
			+'<li id="kuaduzs_zu_3">3</li><li id="kuaduzs_zu_4">4</li><li id="kuaduzs_zu_5">5</li><li id="kuaduzs_zu_6">6</li>'
			+'<li id="kuaduzs_zu_7">7</li><li id="kuaduzs_zu_8">8</li><li id="kuaduzs_zu_9">9</li></ul>'
			+ '<ul class="gongn"><li datascope="kuaduzs_zu_ful_0-9">全</li><li datascope="kuaduzs_zu_big_0-9">大</li><li datascope="kuaduzs_zu_sma_0-9">小</li>'
			+'<li datascope="kuaduzs_zu_sin_0-9">单</li><li datascope="kuaduzs_zu_dou_0-9">双</li><li datascope="kuaduzs_zu_cle_0-9">清</li></ul></dd></dl>',
		bettips : '至少选择一个号码组成一注。',
		betexample : '投注方案：选择5, 等于开奖号中三位2,5,7的最大数7与最小数字2的差值，即为中奖。',
		bethelp : '玩法：选择0-9，若所选号码与开奖号中三位的最大最小数字的差值相等，即中奖。',
		vali : function() {
			if (!way.get(this.rulecode + ".count.zu")) {
				way.set("Lottery.itemcount", "0");
				way.set("Lottery.total", "0");
			} else if (way.get("Lottery.times")) {

				var itemcount = 0;
				var vballs = way.get(this.rulecode + ".balls.zu");
				for (j = 0; j < vballs.length; j++) {
					if (vballs[j] != "" && !isNaN(vballs[j])) {
						itemcount += arrkuadusx[parseInt(vballs[j])];
					}
				}

				way.set("Lottery.itemcount", ""+itemcount);
				var total = itemcount * way.get("Lottery.times")
						* way.get("http://www.yugj881.com/resources/main/lottery/Lottery.yjf") * Env.price;
				if (total)
					way.set("Lottery.total", total.toFixed(4));
				else
					way.set("Lottery.total", "0");
			} else {
				way.set("Lottery.total", "0");
			}
		},
		clear : function() {
			var ss = [ "zu" ];
			for (k = 0; k < 1; k++)
				for (i = 0; i <= 9; i++) {
					var item = $("#kuaduzs_" + ss[k] + "_" + i);
					if (item.hasClass("cur")) {
						item.trigger('click');
					}
				}
		}
	},
	"kuaduhs" : {
		showname : '跨度',
		rulecode : 'kuaduhs',
		realname : '[跨度_后三跨度]',
		maxMultiplePerOrder : -1,
		maxPrize : -1,
		maxRecord : -1,
		
		fixed : 2,
		minMode : 1850,
		startPrice : 1800,
		calculatePrize : Env.defaultCalculate,
		pageHtml :'<dl class="danqiu" id="kuaduhs"><dd><h5>后三跨度</h5>'
			+ '<ul class="sz-qiu"><li id="kuaduhs_zu_0">0</li><li id="kuaduhs_zu_1">1</li><li id="kuaduhs_zu_2">2</li>'
			+'<li id="kuaduhs_zu_3">3</li><li id="kuaduhs_zu_4">4</li><li id="kuaduhs_zu_5">5</li><li id="kuaduhs_zu_6">6</li>'
			+'<li id="kuaduhs_zu_7">7</li><li id="kuaduhs_zu_8">8</li><li id="kuaduhs_zu_9">9</li></ul>'
			+ '<ul class="gongn"><li datascope="kuaduhs_zu_ful_0-9">全</li><li datascope="kuaduhs_zu_big_0-9">大</li><li datascope="kuaduhs_zu_sma_0-9">小</li>'
			+'<li datascope="kuaduhs_zu_sin_0-9">单</li><li datascope="kuaduhs_zu_dou_0-9">双</li><li datascope="kuaduhs_zu_cle_0-9">清</li></ul></dd></dl>',
		bettips : '至少选择一个号码组成一注。',
		betexample : '投注方案：选择5, 等于开奖号后三位2,5,7的最大数7与最小数字2的差值，即为中奖。',
		bethelp : '玩法：选择0-9，若所选号码与开奖号后三位的最大最小数字的差值相等，即中奖。',
		vali : function() {
			if (!way.get(this.rulecode + ".count.zu")) {
				way.set("Lottery.itemcount", "0");
				way.set("Lottery.total", "0");
			} else if (way.get("Lottery.times")) {

				var itemcount = 0;
				var vballs = way.get(this.rulecode + ".balls.zu");
				for (j = 0; j < vballs.length; j++) {
					if (vballs[j] != "" && !isNaN(vballs[j])) {
						itemcount += arrkuadusx[parseInt(vballs[j])];
					}
				}

				way.set("Lottery.itemcount", ""+itemcount);
				var total = itemcount * way.get("Lottery.times")
						* way.get("http://www.yugj881.com/resources/main/lottery/Lottery.yjf") * Env.price;
				if (total)
					way.set("Lottery.total", total.toFixed(4));
				else
					way.set("Lottery.total", "0");
			} else {
				way.set("Lottery.total", "0");
			}
		},
		clear : function() {
			var ss = [ "zu" ];
			for (k = 0; k < 1; k++)
				for (i = 0; i <= 9; i++) {
					var item = $("#kuaduhs_" + ss[k] + "_" + i);
					if (item.hasClass("cur")) {
						item.trigger('click');
					}
				}
		}
	},
	"kuaduqe" : {
		showname : '跨度',
		rulecode : 'kuaduqe',
		realname : '[跨度_前二跨度]',
		maxMultiplePerOrder : -1,
		maxPrize : -1,
		maxRecord : -1,
		
		fixed : 0.2,
		minMode : 1850,
		startPrice : 180,
		calculatePrize : Env.defaultCalculate,
		pageHtml :'<dl class="danqiu" id="kuaduqe"><dd><h5>前二跨度</h5>'
			+ '<ul class="sz-qiu"><li id="kuaduqe_zu_0">0</li><li id="kuaduqe_zu_1">1</li><li id="kuaduqe_zu_2">2</li>'
			+'<li id="kuaduqe_zu_3">3</li><li id="kuaduqe_zu_4">4</li><li id="kuaduqe_zu_5">5</li><li id="kuaduqe_zu_6">6</li>'
			+'<li id="kuaduqe_zu_7">7</li><li id="kuaduqe_zu_8">8</li><li id="kuaduqe_zu_9">9</li></ul>'
			+ '<ul class="gongn"><li datascope="kuaduqe_zu_ful_0-9">全</li><li datascope="kuaduqe_zu_big_0-9">大</li><li datascope="kuaduqe_zu_sma_0-9">小</li>'
			+'<li datascope="kuaduqe_zu_sin_0-9">单</li><li datascope="kuaduqe_zu_dou_0-9">双</li><li datascope="kuaduqe_zu_cle_0-9">清</li></ul></dd></dl>',
		bettips : '至少选择一个号码组成一注。',
		betexample : '投注方案：选择5, 等于开奖号前二位2,7的最大数7与最小数字2的差值，即为中奖。',
		bethelp : '玩法：选择0-9，若所选号码与开奖号前二位的最大最小数字的差值相等，即中奖。',
		vali : function() {
			if (!way.get(this.rulecode + ".count.zu")) {
				way.set("Lottery.itemcount", "0");
				way.set("Lottery.total", "0");
			} else if (way.get("Lottery.times")) {

				var itemcount = 0;
				var vballs = way.get(this.rulecode + ".balls.zu");
				for (j = 0; j < vballs.length; j++) {
					if (vballs[j] != "" && !isNaN(vballs[j])) {
						itemcount += arrkuaduex[parseInt(vballs[j])];
					}
				}

				way.set("Lottery.itemcount", ""+itemcount);
				var total = itemcount * way.get("Lottery.times")
						* way.get("http://www.yugj881.com/resources/main/lottery/Lottery.yjf") * Env.price;
				if (total)
					way.set("Lottery.total", total.toFixed(4));
				else
					way.set("Lottery.total", "0");
			} else {
				way.set("Lottery.total", "0");
			}
		},
		clear : function() {
			var ss = [ "zu" ];
			for (k = 0; k < 1; k++)
				for (i = 0; i <= 9; i++) {
					var item = $("#kuaduqe_" + ss[k] + "_" + i);
					if (item.hasClass("cur")) {
						item.trigger('click');
					}
				}
		}
	},
	"kuaduhe" : {
		showname : '跨度',
		rulecode : 'kuaduhe',
		realname : '[跨度_后二跨度]',
		maxMultiplePerOrder : -1,
		maxPrize : -1,
		maxRecord : -1,
		
		fixed : 0.2,
		minMode : 1850,
		startPrice : 180,
		calculatePrize : Env.defaultCalculate,
		pageHtml :'<dl class="danqiu" id="kuaduhe"><dd><h5>后二跨度</h5>'
			+ '<ul class="sz-qiu"><li id="kuaduhe_zu_0">0</li><li id="kuaduhe_zu_1">1</li><li id="kuaduhe_zu_2">2</li>'
			+'<li id="kuaduhe_zu_3">3</li><li id="kuaduhe_zu_4">4</li><li id="kuaduhe_zu_5">5</li><li id="kuaduhe_zu_6">6</li>'
			+'<li id="kuaduhe_zu_7">7</li><li id="kuaduhe_zu_8">8</li><li id="kuaduhe_zu_9">9</li></ul>'
			+ '<ul class="gongn"><li datascope="kuaduhe_zu_ful_0-9">全</li><li datascope="kuaduhe_zu_big_0-9">大</li><li datascope="kuaduhe_zu_sma_0-9">小</li>'
			+'<li datascope="kuaduhe_zu_sin_0-9">单</li><li datascope="kuaduhe_zu_dou_0-9">双</li><li datascope="kuaduhe_zu_cle_0-9">清</li></ul></dd></dl>',
		bettips : '至少选择一个号码组成一注。',
		betexample : '投注方案：选择5, 等于开奖号后二位2,7的最大数7与最小数字2的差值，即为中奖。',
		bethelp : '玩法：选择0-9，若所选号码与开奖号后二位的最大最小数字的差值相等，即中奖。',
		vali : function() {
			if (!way.get(this.rulecode + ".count.zu")) {
				way.set("Lottery.itemcount", "0");
				way.set("Lottery.total", "0");
			} else if (way.get("Lottery.times")) {

				var itemcount = 0;
				var vballs = way.get(this.rulecode + ".balls.zu");
				for (j = 0; j < vballs.length; j++) {
					if (vballs[j] != "" && !isNaN(vballs[j])) {
						itemcount += arrkuaduex[parseInt(vballs[j])];
					}
				}

				way.set("Lottery.itemcount", ""+itemcount);
				var total = itemcount * way.get("Lottery.times")
						* way.get("http://www.yugj881.com/resources/main/lottery/Lottery.yjf") * Env.price;
				if (total)
					way.set("Lottery.total", total.toFixed(4));
				else
					way.set("Lottery.total", "0");
			} else {
				way.set("Lottery.total", "0");
			}
		},
		clear : function() {
			var ss = [ "zu" ];
			for (k = 0; k < 1; k++)
				for (i = 0; i <= 9; i++) {
					var item = $("#kuaduhe_" + ss[k] + "_" + i);
					if (item.hasClass("cur")) {
						item.trigger('click');
					}
				}
		}	},
    //
    "lhwq" : {
        showname : '万千',
        rulecode : 'lhwq',
        realname : '[龙虎_万千]',
        maxMultiplePerOrder : -1,
        maxPrize : -1,
        maxRecord : -1,
        minMode : 1700,
        startPrice : 1.889,
        calculatePrize : Env.defaultCalculate,
        pageHtml :'<dl class="danqiu" id="lhwq"><dd><h5>万千</h5>'
        + '<ul class="sz-qiu"><li id="lhwq_zu_0">龙</li><li id="lhwq_zu_1">虎</li>'
        +'</ul></dd></dl>',
        bettips : '从龙虎中任意选择1个以上。',
        betexample : '投注方案：例如投注龙，开奖号为64535，则中奖。',
        bethelp : '玩法：开奖号码的万位数字大于千位数字则为龙；万位小于千位则为虎；万位等于千位则为和。',
        replaceCode:function(codes){
            codes=codes.replace(new RegExp('0', 'g'),"龙");
            codes=codes.replace(new RegExp('1', 'g'),"虎");
            codes=codes.replace(new RegExp('2', 'g'),"和");
            return codes;
        },
        vali : function() {
            if (!way.get(this.rulecode + ".count.zu")) {
                way.set("Lottery.itemcount", "0");
                way.set("Lottery.total", "0");
            } else if (way.get("Lottery.times")) {
                var itemcount = way.get(this.rulecode + ".count.zu");
                way.set("Lottery.itemcount", ""+itemcount);
                var total = itemcount * way.get("Lottery.times")
                    * way.get("http://www.yugj881.com/resources/main/lottery/Lottery.yjf") * Env.price;
                if (total)
                    way.set("Lottery.total", total.toFixed(4));
                else
                    way.set("Lottery.total", "0");
            } else {
                way.set("Lottery.total", "0");
            }
        },
        clear : function() {
            var ss = [ "zu" ];
            for (k = 0; k < 1; k++)
                for (i = 0; i <= 9; i++) {
                    var item = $("#lhwq_" + ss[k] + "_" + i);
                    if (item.hasClass("cur")) {
                        item.trigger('click');
                    }
                }
        }
    },
    "lhwb" : {
        showname : '万百',
        rulecode : 'lhwb',
        realname : '[龙虎_万百]',
        maxMultiplePerOrder : -1,
        maxPrize : -1,
        maxRecord : -1,
        minMode : 1700,
        startPrice : 1.889,
        calculatePrize : Env.defaultCalculate,
        pageHtml :'<dl class="danqiu" id="lhwb"><dd><h5>万百</h5>'
        + '<ul class="sz-qiu"><li id="lhwb_zu_0">龙</li><li id="lhwb_zu_1">虎</li>'
        +'</ul></dd></dl>',
        bettips : '从龙虎中任意选择1个以上。',
        betexample : '投注方案：例如投注龙，开奖号为62535，则中奖。',
        bethelp : '玩法：开奖号码的万位数字大于百位数字则为龙；万位小于百位则为虎；万位等于百位则为和。',
        replaceCode:function(codes){
            codes=codes.replace(new RegExp('0', 'g'),"龙");
            codes=codes.replace(new RegExp('1', 'g'),"虎");
            codes=codes.replace(new RegExp('2', 'g'),"和");
            return codes;
        },
        vali : function() {
            if (!way.get(this.rulecode + ".count.zu")) {
                way.set("Lottery.itemcount", "0");
                way.set("Lottery.total", "0");
            } else if (way.get("Lottery.times")) {
                var itemcount = way.get(this.rulecode + ".count.zu");
                way.set("Lottery.itemcount", ""+itemcount);
                var total = itemcount * way.get("Lottery.times")
                    * way.get("http://www.yugj881.com/resources/main/lottery/Lottery.yjf") * Env.price;
                if (total)
                    way.set("Lottery.total", total.toFixed(4));
                else
                    way.set("Lottery.total", "0");
            } else {
                way.set("Lottery.total", "0");
            }
        },
        clear : function() {
            var ss = [ "zu" ];
            for (k = 0; k < 1; k++)
                for (i = 0; i <= 9; i++) {
                    var item = $("#lhwb_" + ss[k] + "_" + i);
                    if (item.hasClass("cur")) {
                        item.trigger('click');
                    }
                }
        }
    },
    "lhws" : {
        showname : '万十',
        rulecode : 'lhws',
        realname : '[龙虎_万十]',
        maxMultiplePerOrder : -1,
        maxPrize : -1,
        maxRecord : -1,
        minMode : 1700,
        startPrice : 1.889,
        calculatePrize : Env.defaultCalculate,
        pageHtml :'<dl class="danqiu" id="lhws"><dd><h5>万十</h5>'
        + '<ul class="sz-qiu"><li id="lhws_zu_0">龙</li><li id="lhws_zu_1">虎</li>'
        +'</ul></dd></dl>',
        bettips : '从龙虎中任意选择1个以上。',
        betexample : '投注方案：例如投注龙，开奖号为64535，则中奖。',
        bethelp : '玩法：开奖号码的万位数字大于十位数字则为龙；万位小于十位则为虎；万位等于十位则为和。',
        replaceCode:function(codes){
            codes=codes.replace(new RegExp('0', 'g'),"龙");
            codes=codes.replace(new RegExp('1', 'g'),"虎");
            codes=codes.replace(new RegExp('2', 'g'),"和");
            return codes;
        },
        vali : function() {
            if (!way.get(this.rulecode + ".count.zu")) {
                way.set("Lottery.itemcount", "0");
                way.set("Lottery.total", "0");
            } else if (way.get("Lottery.times")) {
                var itemcount = way.get(this.rulecode + ".count.zu");
                way.set("Lottery.itemcount", ""+itemcount);
                var total = itemcount * way.get("Lottery.times")
                    * way.get("http://www.yugj881.com/resources/main/lottery/Lottery.yjf") * Env.price;
                if (total)
                    way.set("Lottery.total", total.toFixed(4));
                else
                    way.set("Lottery.total", "0");
            } else {
                way.set("Lottery.total", "0");
            }
        },
        clear : function() {
            var ss = [ "zu" ];
            for (k = 0; k < 1; k++)
                for (i = 0; i <= 9; i++) {
                    var item = $("#lhws_" + ss[k] + "_" + i);
                    if (item.hasClass("cur")) {
                        item.trigger('click');
                    }
                }
        }
    },
    "lhwg" : {
        showname : '万个',
        rulecode : 'lhwg',
        realname : '[龙虎_万个]',
        maxMultiplePerOrder : -1,
        maxPrize : -1,
        maxRecord : -1,
        minMode : 1700,
        startPrice : 1.889,
        calculatePrize : Env.defaultCalculate,
        pageHtml :'<dl class="danqiu" id="lhwg"><dd><h5>万个</h5>'
        + '<ul class="sz-qiu"><li id="lhwg_zu_0">龙</li><li id="lhwg_zu_1">虎</li>'
        +'</ul></dd></dl>',
        bettips : '从龙虎中任意选择1个以上。',
        betexample : '投注方案：例如投注龙，开奖号为64535，则中奖。',
        bethelp : '玩法：开奖号码的万位数字大于个位数字则为龙；万位小于个位则为虎；万位等于个位则为和。',
        replaceCode:function(codes){
            codes=codes.replace(new RegExp('0', 'g'),"龙");
            codes=codes.replace(new RegExp('1', 'g'),"虎");
            codes=codes.replace(new RegExp('2', 'g'),"和");
            return codes;
        },
        vali : function() {
            if (!way.get(this.rulecode + ".count.zu")) {
                way.set("Lottery.itemcount", "0");
                way.set("Lottery.total", "0");
            } else if (way.get("Lottery.times")) {
                var itemcount = way.get(this.rulecode + ".count.zu");
                way.set("Lottery.itemcount", ""+itemcount);
                var total = itemcount * way.get("Lottery.times")
                    * way.get("http://www.yugj881.com/resources/main/lottery/Lottery.yjf") * Env.price;
                if (total)
                    way.set("Lottery.total", total.toFixed(4));
                else
                    way.set("Lottery.total", "0");
            } else {
                way.set("Lottery.total", "0");
            }
        },
        clear : function() {
            var ss = [ "zu" ];
            for (k = 0; k < 1; k++)
                for (i = 0; i <= 9; i++) {
                    var item = $("#lhwg_" + ss[k] + "_" + i);
                    if (item.hasClass("cur")) {
                        item.trigger('click');
                    }
                }
        }
    },
    "lhqb" : {
        showname : '千百',
        rulecode : 'lhqb',
        realname : '[龙虎_千百]',
        maxMultiplePerOrder : -1,
        maxPrize : -1,
        maxRecord : -1,
        minMode : 1700,
        startPrice : 1.889,
        calculatePrize : Env.defaultCalculate,
        pageHtml :'<dl class="danqiu" id="lhqb"><dd><h5>千百</h5>'
        + '<ul class="sz-qiu"><li id="lhqb_zu_0">龙</li><li id="lhqb_zu_1">虎</li>'
        +'</ul></dd></dl>',
        bettips : '从龙虎中任意选择1个以上。',
        betexample : '投注方案：例如投注龙，开奖号为26535，则中奖。',
        bethelp : '玩法：开奖号码的千位数字大于百位数字则为龙；千位小于百位则为虎；千位等于百位则为和。',
        replaceCode:function(codes){
            codes=codes.replace(new RegExp('0', 'g'),"龙");
            codes=codes.replace(new RegExp('1', 'g'),"虎");
            codes=codes.replace(new RegExp('2', 'g'),"和");
            return codes;
        },
        vali : function() {
            if (!way.get(this.rulecode + ".count.zu")) {
                way.set("Lottery.itemcount", "0");
                way.set("Lottery.total", "0");
            } else if (way.get("Lottery.times")) {
                var itemcount = way.get(this.rulecode + ".count.zu");
                way.set("Lottery.itemcount", ""+itemcount);
                var total = itemcount * way.get("Lottery.times")
                    * way.get("http://www.yugj881.com/resources/main/lottery/Lottery.yjf") * Env.price;
                if (total)
                    way.set("Lottery.total", total.toFixed(4));
                else
                    way.set("Lottery.total", "0");
            } else {
                way.set("Lottery.total", "0");
            }
        },
        clear : function() {
            var ss = [ "zu" ];
            for (k = 0; k < 1; k++)
                for (i = 0; i <= 9; i++) {
                    var item = $("#lhqb_" + ss[k] + "_" + i);
                    if (item.hasClass("cur")) {
                        item.trigger('click');
                    }
                }
        }
    },
    "lhqs" : {
        showname : '千十',
        rulecode : 'lhqs',
        realname : '[龙虎_千十]',
        maxMultiplePerOrder : -1,
        maxPrize : -1,
        maxRecord : -1,
        minMode : 1700,
        startPrice : 1.889,
        calculatePrize : Env.defaultCalculate,
        pageHtml :'<dl class="danqiu" id="lhqs"><dd><h5>千十</h5>'
        + '<ul class="sz-qiu"><li id="lhqs_zu_0">龙</li><li id="lhqs_zu_1">虎</li>'
        +'</ul></dd></dl>',
        bettips : '从龙虎中任意选择1个以上。',
        betexample : '投注方案：例如投注龙，开奖号为26535，则中奖。',
        bethelp : '玩法：开奖号码的千位数字大于十位数字则为龙；千位小于十位则为虎；千位等于十位则为和。',
        replaceCode:function(codes){
            codes=codes.replace(new RegExp('0', 'g'),"龙");
            codes=codes.replace(new RegExp('1', 'g'),"虎");
            codes=codes.replace(new RegExp('2', 'g'),"和");
            return codes;
        },
        vali : function() {
            if (!way.get(this.rulecode + ".count.zu")) {
                way.set("Lottery.itemcount", "0");
                way.set("Lottery.total", "0");
            } else if (way.get("Lottery.times")) {
                var itemcount = way.get(this.rulecode + ".count.zu");
                way.set("Lottery.itemcount", ""+itemcount);
                var total = itemcount * way.get("Lottery.times")
                    * way.get("http://www.yugj881.com/resources/main/lottery/Lottery.yjf") * Env.price;
                if (total)
                    way.set("Lottery.total", total.toFixed(4));
                else
                    way.set("Lottery.total", "0");
            } else {
                way.set("Lottery.total", "0");
            }
        },
        clear : function() {
            var ss = [ "zu" ];
            for (k = 0; k < 1; k++)
                for (i = 0; i <= 9; i++) {
                    var item = $("#lhqs_" + ss[k] + "_" + i);
                    if (item.hasClass("cur")) {
                        item.trigger('click');
                    }
                }
        }
    },
    "lhqg" : {
        showname : '千个',
        rulecode : 'lhqg',
        realname : '[龙虎_千个]',
        maxMultiplePerOrder : -1,
        maxPrize : -1,
        maxRecord : -1,
        minMode : 1700,
        startPrice : 1.889,
        calculatePrize : Env.defaultCalculate,
        pageHtml :'<dl class="danqiu" id="lhqg"><dd><h5>千个</h5>'
        + '<ul class="sz-qiu"><li id="lhqg_zu_0">龙</li><li id="lhqg_zu_1">虎</li>'
        +'</ul></dd></dl>',
        bettips : '从龙虎中任意选择1个以上。',
        betexample : '投注方案：例如投注龙，开奖号为26535，则中奖。',
        bethelp : '玩法：开奖号码的千位数字大于个位数字则为龙；千位小于个位则为虎；千位等于个位则为和。',
        replaceCode:function(codes){
            codes=codes.replace(new RegExp('0', 'g'),"龙");
            codes=codes.replace(new RegExp('1', 'g'),"虎");
            codes=codes.replace(new RegExp('2', 'g'),"和");
            return codes;
        },
        vali : function() {
            if (!way.get(this.rulecode + ".count.zu")) {
                way.set("Lottery.itemcount", "0");
                way.set("Lottery.total", "0");
            } else if (way.get("Lottery.times")) {
                var itemcount = way.get(this.rulecode + ".count.zu");
                way.set("Lottery.itemcount", ""+itemcount);
                var total = itemcount * way.get("Lottery.times")
                    * way.get("http://www.yugj881.com/resources/main/lottery/Lottery.yjf") * Env.price;
                if (total)
                    way.set("Lottery.total", total.toFixed(4));
                else
                    way.set("Lottery.total", "0");
            } else {
                way.set("Lottery.total", "0");
            }
        },
        clear : function() {
            var ss = [ "zu" ];
            for (k = 0; k < 1; k++)
                for (i = 0; i <= 9; i++) {
                    var item = $("#lhqg_" + ss[k] + "_" + i);
                    if (item.hasClass("cur")) {
                        item.trigger('click');
                    }
                }
        }
    },
    "lhbs" : {
        showname : '百十',
        rulecode : 'lhbs',
        realname : '[龙虎_百十]',
        maxMultiplePerOrder : -1,
        maxPrize : -1,
        maxRecord : -1,
        minMode : 1700,
        startPrice : 1.889,
        calculatePrize : Env.defaultCalculate,
        pageHtml :'<dl class="danqiu" id="lhbs"><dd><h5>百十</h5>'
        + '<ul class="sz-qiu"><li id="lhbs_zu_0">龙</li><li id="lhbs_zu_1">虎</li>'
        +'</ul></dd></dl>',
        bettips : '从龙虎中任意选择1个以上。',
        betexample : '投注方案：例如投注龙，开奖号为64532，则中奖。',
        bethelp : '玩法：开奖号码的百位数字大于十位数字则为龙；百位小于十位则为虎；百位等于十位则为和。',
        replaceCode:function(codes){
            codes=codes.replace(new RegExp('0', 'g'),"龙");
            codes=codes.replace(new RegExp('1', 'g'),"虎");
            codes=codes.replace(new RegExp('2', 'g'),"和");
            return codes;
        },
        vali : function() {
            if (!way.get(this.rulecode + ".count.zu")) {
                way.set("Lottery.itemcount", "0");
                way.set("Lottery.total", "0");
            } else if (way.get("Lottery.times")) {
                var itemcount = way.get(this.rulecode + ".count.zu");
                way.set("Lottery.itemcount", ""+itemcount);
                var total = itemcount * way.get("Lottery.times")
                    * way.get("http://www.yugj881.com/resources/main/lottery/Lottery.yjf") * Env.price;
                if (total)
                    way.set("Lottery.total", total.toFixed(4));
                else
                    way.set("Lottery.total", "0");
            } else {
                way.set("Lottery.total", "0");
            }
        },
        clear : function() {
            var ss = [ "zu" ];
            for (k = 0; k < 1; k++)
                for (i = 0; i <= 9; i++) {
                    var item = $("#lhbs_" + ss[k] + "_" + i);
                    if (item.hasClass("cur")) {
                        item.trigger('click');
                    }
                }
        }
    },
    "lhbg" : {
        showname : '百个',
        rulecode : 'lhbg',
        realname : '[龙虎_百个]',
        maxMultiplePerOrder : -1,
        maxPrize : -1,
        maxRecord : -1,
        minMode : 1700,
        startPrice : 1.889,
        calculatePrize : Env.defaultCalculate,
        pageHtml :'<dl class="danqiu" id="lhbg"><dd><h5>百个</h5>'
        + '<ul class="sz-qiu"><li id="lhbg_zu_0">龙</li><li id="lhbg_zu_1">虎</li>'
        +'</ul></dd></dl>',
        bettips : '从龙虎中任意选择1个以上。',
        betexample : '投注方案：例如投注龙，开奖号为64532，则中奖。',
        bethelp : '玩法：开奖号码的百位数字大于个位数字则为龙；百位小于个位则为虎；百位等于个位则为和。',
        replaceCode:function(codes){
            codes=codes.replace(new RegExp('0', 'g'),"龙");
            codes=codes.replace(new RegExp('1', 'g'),"虎");
            codes=codes.replace(new RegExp('2', 'g'),"和");
            return codes;
        },
        vali : function() {
            if (!way.get(this.rulecode + ".count.zu")) {
                way.set("Lottery.itemcount", "0");
                way.set("Lottery.total", "0");
            } else if (way.get("Lottery.times")) {
                var itemcount = way.get(this.rulecode + ".count.zu");
                way.set("Lottery.itemcount", ""+itemcount);
                var total = itemcount * way.get("Lottery.times")
                    * way.get("http://www.yugj881.com/resources/main/lottery/Lottery.yjf") * Env.price;
                if (total)
                    way.set("Lottery.total", total.toFixed(4));
                else
                    way.set("Lottery.total", "0");
            } else {
                way.set("Lottery.total", "0");
            }
        },
        clear : function() {
            var ss = [ "zu" ];
            for (k = 0; k < 1; k++)
                for (i = 0; i <= 9; i++) {
                    var item = $("#lhbg_" + ss[k] + "_" + i);
                    if (item.hasClass("cur")) {
                        item.trigger('click');
                    }
                }
        }
    },
    "lhsg" : {
        showname : '十个',
        rulecode : 'lhsg',
        realname : '[龙虎_十个]',
        maxMultiplePerOrder : -1,
        maxPrize : -1,
        maxRecord : -1,
        minMode : 1700,
        startPrice : 1.889,
        calculatePrize : Env.defaultCalculate,
        pageHtml :'<dl class="danqiu" id="lhsg"><dd><h5>十个</h5>'
        + '<ul class="sz-qiu"><li id="lhsg_zu_0">龙</li><li id="lhsg_zu_1">虎</li>'
        +'</ul></dd></dl>',
        bettips : '从龙虎中任意选择1个以上。',
        betexample : '投注方案：例如投注龙，开奖号为64532，则中奖。',
        bethelp : '玩法：开奖号码的十位数字大于个位数字则为龙；十位小于个位则为虎；十位等于个位则为和。',
        replaceCode:function(codes){
            codes=codes.replace(new RegExp('0', 'g'),"龙");
            codes=codes.replace(new RegExp('1', 'g'),"虎");
            codes=codes.replace(new RegExp('2', 'g'),"和");
            return codes;
        },
        vali : function() {
            if (!way.get(this.rulecode + ".count.zu")) {
                way.set("Lottery.itemcount", "0");
                way.set("Lottery.total", "0");
            } else if (way.get("Lottery.times")) {
                var itemcount = way.get(this.rulecode + ".count.zu");
                way.set("Lottery.itemcount", ""+itemcount);
                var total = itemcount * way.get("Lottery.times")
                    * way.get("http://www.yugj881.com/resources/main/lottery/Lottery.yjf") * Env.price;
                if (total)
                    way.set("Lottery.total", total.toFixed(4));
                else
                    way.set("Lottery.total", "0");
            } else {
                way.set("Lottery.total", "0");
            }
        },
        clear : function() {
            var ss = [ "zu" ];
            for (k = 0; k < 1; k++)
                for (i = 0; i <= 9; i++) {
                    var item = $("#lhsg_" + ss[k] + "_" + i);
                    if (item.hasClass("cur")) {
                        item.trigger('click');
                    }
                }
        }
    },
    //
    "hwq" : {
        showname : '万千',
        rulecode : 'hwq',
        realname : '[和_万千]',
        maxMultiplePerOrder : -1,
        maxPrize : -1,
        maxRecord : -1,
        minMode : 1700,
        startPrice : 1.889,
        calculatePrize : Env.defaultCalculate,
        pageHtml :'<dl class="danqiu" id="hwq"><dd><h5>万千</h5>'
        + '<ul class="sz-qiu"><li id="hwq_zu_0">和</li>'
        +'</ul></dd></dl>',
        bettips : '选择和进行投注',
        betexample : '投注方案：例如投注和，开奖号为66535，即为中奖',
        bethelp : '投注玩法：开奖号码的万位数字大于千位数字则为龙；万位小于千位则为虎；万位等于千位则为和。',
        replaceCode:function(codes){
            codes=codes.replace(new RegExp('0', 'g'),"和");
            return codes;
        },
        vali : function() {
            if (!way.get(this.rulecode + ".count.zu")) {
                way.set("Lottery.itemcount", "0");
                way.set("Lottery.total", "0");
            } else if (way.get("Lottery.times")) {
                var itemcount = way.get(this.rulecode + ".count.zu");
                way.set("Lottery.itemcount", ""+itemcount);
                var total = itemcount * way.get("Lottery.times")
                    * way.get("http://www.yugj881.com/resources/main/lottery/Lottery.yjf") * Env.price;
                if (total)
                    way.set("Lottery.total", total.toFixed(4));
                else
                    way.set("Lottery.total", "0");
            } else {
                way.set("Lottery.total", "0");
            }

        },
        clear : function() {
            var ss = [ "zu" ];
            for (k = 0; k < 1; k++)
                for (i = 0; i <= 9; i++) {
                    var item = $("#hwq_" + ss[k] + "_" + i);
                    if (item.hasClass("cur")) {
                        item.trigger('click');
                    }
                }
        }
    },
    "hwb" : {
        showname : '万百',
        rulecode : 'hwb',
        realname : '[和_万百]',
        maxMultiplePerOrder : -1,
        maxPrize : -1,
        maxRecord : -1,
        minMode : 1700,
        startPrice : 1.889,
        calculatePrize : Env.defaultCalculate,
        pageHtml :'<dl class="danqiu" id="hwb"><dd><h5>万百</h5>'
        + '<ul class="sz-qiu"><li id="hwb_zu_0">和</li>'
        +'</ul></dd></dl>',
        bettips : '选择和进行投注',
        betexample : '投注方案：例如投注和，开奖号为62635，即为中奖',
        bethelp : '玩法：开奖号码的万位数字大于百位数字则为龙；万位小于百位则为虎；万位等于百位则为和。',
        replaceCode:function(codes){
            codes=codes.replace(new RegExp('0', 'g'),"和");
            return codes;
        },
        vali : function() {
            if (!way.get(this.rulecode + ".count.zu")) {
                way.set("Lottery.itemcount", "0");
                way.set("Lottery.total", "0");
            } else if (way.get("Lottery.times")) {
                var itemcount = way.get(this.rulecode + ".count.zu");
                way.set("Lottery.itemcount", ""+itemcount);
                var total = itemcount * way.get("Lottery.times")
                    * way.get("http://www.yugj881.com/resources/main/lottery/Lottery.yjf") * Env.price;
                if (total)
                    way.set("Lottery.total", total.toFixed(4));
                else
                    way.set("Lottery.total", "0");
            } else {
                way.set("Lottery.total", "0");
            }

        },
        clear : function() {
            var ss = [ "zu" ];
            for (k = 0; k < 1; k++)
                for (i = 0; i <= 9; i++) {
                    var item = $("#hwb_" + ss[k] + "_" + i);
                    if (item.hasClass("cur")) {
                        item.trigger('click');
                    }
                }
        }
    },
    "hws" : {
        showname : '万十',
        rulecode : 'hws',
        realname : '[和_万十]',
        maxMultiplePerOrder : -1,
        maxPrize : -1,
        maxRecord : -1,
        minMode : 1700,
        startPrice : 1.889,
        calculatePrize : Env.defaultCalculate,
        pageHtml :'<dl class="danqiu" id="hws"><dd><h5>万十</h5>'
        + '<ul class="sz-qiu"><li id="hws_zu_0">和</li>'
        +'</ul></dd></dl>',
        bettips : '选择和进行投注',
        betexample : '投注方案：例如投注和，开奖号为64565，即为中奖',
        bethelp : '玩法：开奖号码的万位数字大于十位数字则为龙；万位小于十位则为虎；万位等于十位则为和。',
        replaceCode:function(codes){
            codes=codes.replace(new RegExp('0', 'g'),"和");
            return codes;
        },
        vali : function() {
            if (!way.get(this.rulecode + ".count.zu")) {
                way.set("Lottery.itemcount", "0");
                way.set("Lottery.total", "0");
            } else if (way.get("Lottery.times")) {
                var itemcount = way.get(this.rulecode + ".count.zu");
                way.set("Lottery.itemcount", ""+itemcount);
                var total = itemcount * way.get("Lottery.times")
                    * way.get("http://www.yugj881.com/resources/main/lottery/Lottery.yjf") * Env.price;
                if (total)
                    way.set("Lottery.total", total.toFixed(4));
                else
                    way.set("Lottery.total", "0");
            } else {
                way.set("Lottery.total", "0");
            }


        },
        clear : function() {
            var ss = [ "zu" ];
            for (k = 0; k < 1; k++)
                for (i = 0; i <= 9; i++) {
                    var item = $("#hws_" + ss[k] + "_" + i);
                    if (item.hasClass("cur")) {
                        item.trigger('click');
                    }
                }
        }
    },
    "hwg" : {
        showname : '万个',
        rulecode : 'hwg',
        realname : '[和_万个]',
        maxMultiplePerOrder : -1,
        maxPrize : -1,
        maxRecord : -1,
        minMode : 1700,
        startPrice : 1.889,
        calculatePrize : Env.defaultCalculate,
        pageHtml :'<dl class="danqiu" id="hwg"><dd><h5>万个</h5>'
        + '<ul class="sz-qiu"><li id="hwg_zu_0">和</li>'
        +'</ul></dd></dl>',
        bettips : '选择和进行投注',
        betexample : '投注方案：例如投注和，开奖号为64536，即为中奖',
        bethelp : '玩法：开奖号码的万位数字大于个位数字则为龙；万位小于个位则为虎；万位等于个位则为和。',
        replaceCode:function(codes){
            codes=codes.replace(new RegExp('0', 'g'),"和");
            return codes;
        },
        vali : function() {
            if (!way.get(this.rulecode + ".count.zu")) {
                way.set("Lottery.itemcount", "0");
                way.set("Lottery.total", "0");
            } else if (way.get("Lottery.times")) {
                var itemcount = way.get(this.rulecode + ".count.zu");
                way.set("Lottery.itemcount", ""+itemcount);
                var total = itemcount * way.get("Lottery.times")
                    * way.get("http://www.yugj881.com/resources/main/lottery/Lottery.yjf") * Env.price;
                if (total)
                    way.set("Lottery.total", total.toFixed(4));
                else
                    way.set("Lottery.total", "0");
            } else {
                way.set("Lottery.total", "0");
            }


        },
        clear : function() {
            var ss = [ "zu" ];
            for (k = 0; k < 1; k++)
                for (i = 0; i <= 9; i++) {
                    var item = $("#hwg_" + ss[k] + "_" + i);
                    if (item.hasClass("cur")) {
                        item.trigger('click');
                    }
                }
        }
    },
    "hqb" : {
        showname : '千百',
        rulecode : 'hqb',
        realname : '[和_千百]',
        maxMultiplePerOrder : -1,
        maxPrize : -1,
        maxRecord : -1,
        minMode : 1700,
        startPrice : 1.889,
        calculatePrize : Env.defaultCalculate,
        pageHtml :'<dl class="danqiu" id="hqb"><dd><h5>千百</h5>'
        + '<ul class="sz-qiu"><li id="hqb_zu_0">和</li>'
        +'</ul></dd></dl>',
        bettips : '选择和进行投注',
        betexample : '投注方案：例如投注和，开奖号为26635，即为中奖',
        bethelp : '玩法：开奖号码的千位数字大于百位数字则为龙；千位小于百位则为虎；千位等于百位则为和。',
        replaceCode:function(codes){
            codes=codes.replace(new RegExp('0', 'g'),"和");
            return codes;
        },
        vali : function() {
            if (!way.get(this.rulecode + ".count.zu")) {
                way.set("Lottery.itemcount", "0");
                way.set("Lottery.total", "0");
            } else if (way.get("Lottery.times")) {
                var itemcount = way.get(this.rulecode + ".count.zu");
                way.set("Lottery.itemcount", ""+itemcount);
                var total = itemcount * way.get("Lottery.times")
                    * way.get("http://www.yugj881.com/resources/main/lottery/Lottery.yjf") * Env.price;
                if (total)
                    way.set("Lottery.total", total.toFixed(4));
                else
                    way.set("Lottery.total", "0");
            } else {
                way.set("Lottery.total", "0");
            }


        },
        clear : function() {
            var ss = [ "zu" ];
            for (k = 0; k < 1; k++)
                for (i = 0; i <= 9; i++) {
                    var item = $("#hqb_" + ss[k] + "_" + i);
                    if (item.hasClass("cur")) {
                        item.trigger('click');
                    }
                }
        }
    },
    "hqs" : {
        showname : '千十',
        rulecode : 'hqs',
        realname : '[和_千十]',
        maxMultiplePerOrder : -1,
        maxPrize : -1,
        maxRecord : -1,
        minMode : 1700,
        startPrice : 1.889,
        calculatePrize : Env.defaultCalculate,
        pageHtml :'<dl class="danqiu" id="hqs"><dd><h5>千十</h5>'
        + '<ul class="sz-qiu"><li id="hqs_zu_0">和</li>'
        +'</ul></dd></dl>',
        bettips : '选择和进行投注',
        betexample : '投注方案：例如投注和，开奖号为26565，即为中奖',
        bethelp : '玩法：开奖号码的千位数字大于十位数字则为龙；千位小于十位则为虎；千位等于十位则为和。',
        replaceCode:function(codes){
            codes=codes.replace(new RegExp('0', 'g'),"和");
            return codes;
        },
        vali : function() {
            if (!way.get(this.rulecode + ".count.zu")) {
                way.set("Lottery.itemcount", "0");
                way.set("Lottery.total", "0");
            } else if (way.get("Lottery.times")) {
                var itemcount = way.get(this.rulecode + ".count.zu");
                way.set("Lottery.itemcount", ""+itemcount);
                var total = itemcount * way.get("Lottery.times")
                    * way.get("http://www.yugj881.com/resources/main/lottery/Lottery.yjf") * Env.price;
                if (total)
                    way.set("Lottery.total", total.toFixed(4));
                else
                    way.set("Lottery.total", "0");
            } else {
                way.set("Lottery.total", "0");
            }


        },
        clear : function() {
            var ss = [ "zu" ];
            for (k = 0; k < 1; k++)
                for (i = 0; i <= 9; i++) {
                    var item = $("#hqs_" + ss[k] + "_" + i);
                    if (item.hasClass("cur")) {
                        item.trigger('click');
                    }
                }
        }
    },
    "hqg" : {
        showname : '千个',
        rulecode : 'hqg',
        realname : '[和_千个]',
        maxMultiplePerOrder : -1,
        maxPrize : -1,
        maxRecord : -1,
        minMode : 1700,
        startPrice : 1.889,
        calculatePrize : Env.defaultCalculate,
        pageHtml :'<dl class="danqiu" id="hqg"><dd><h5>千个</h5>'
        + '<ul class="sz-qiu"><li id="hqg_zu_0">和</li>'
        +'</ul></dd></dl>',
        bettips : '选择和进行投注',
        betexample : '投注方案：例如投注和，开奖号为26536，即为中奖',
        bethelp : '玩法：开奖号码的千位数字大于个位数字则为龙；千位小于个位则为虎；千位等于个位则为和。',
        replaceCode:function(codes){
            codes=codes.replace(new RegExp('0', 'g'),"和");
            return codes;
        },
        vali : function() {
            if (!way.get(this.rulecode + ".count.zu")) {
                way.set("Lottery.itemcount", "0");
                way.set("Lottery.total", "0");
            } else if (way.get("Lottery.times")) {
                var itemcount = way.get(this.rulecode + ".count.zu");
                way.set("Lottery.itemcount", ""+itemcount);
                var total = itemcount * way.get("Lottery.times")
                    * way.get("http://www.yugj881.com/resources/main/lottery/Lottery.yjf") * Env.price;
                if (total)
                    way.set("Lottery.total", total.toFixed(4));
                else
                    way.set("Lottery.total", "0");
            } else {
                way.set("Lottery.total", "0");
            }


        },
        clear : function() {
            var ss = [ "zu" ];
            for (k = 0; k < 1; k++)
                for (i = 0; i <= 9; i++) {
                    var item = $("#hqg_" + ss[k] + "_" + i);
                    if (item.hasClass("cur")) {
                        item.trigger('click');
                    }
                }
        }
    },
    "hbs" : {
        showname : '百十',
        rulecode : 'hbs',
        realname : '[和_百十]',
        maxMultiplePerOrder : -1,
        maxPrize : -1,
        maxRecord : -1,
        minMode : 1700,
        startPrice : 1.889,
        calculatePrize : Env.defaultCalculate,
        pageHtml :'<dl class="danqiu" id="hbs"><dd><h5>百十</h5>'
        + '<ul class="sz-qiu"><li id="hbs_zu_0">和</li>'
        +'</ul></dd></dl>',
        bettips : '选择和进行投注',
        betexample : '投注方案：例如投注和，开奖号为64552，即为中奖',
        bethelp : '玩法：开奖号码的百位数字大于十位数字则为龙；百位小于十位则为虎；百位等于十位则为和。',
        replaceCode:function(codes){
            codes=codes.replace(new RegExp('0', 'g'),"和");
            return codes;
        },
        vali : function() {
            if (!way.get(this.rulecode + ".count.zu")) {
                way.set("Lottery.itemcount", "0");
                way.set("Lottery.total", "0");
            } else if (way.get("Lottery.times")) {
                var itemcount = way.get(this.rulecode + ".count.zu");
                way.set("Lottery.itemcount", ""+itemcount);
                var total = itemcount * way.get("Lottery.times")
                    * way.get("http://www.yugj881.com/resources/main/lottery/Lottery.yjf") * Env.price;
                if (total)
                    way.set("Lottery.total", total.toFixed(4));
                else
                    way.set("Lottery.total", "0");
            } else {
                way.set("Lottery.total", "0");
            }


        },
        clear : function() {
            var ss = [ "zu" ];
            for (k = 0; k < 1; k++)
                for (i = 0; i <= 9; i++) {
                    var item = $("#hbs_" + ss[k] + "_" + i);
                    if (item.hasClass("cur")) {
                        item.trigger('click');
                    }
                }
        }
    },
    "hbg" : {
        showname : '百个',
        rulecode : 'hbg',
        realname : '[和_百个]',
        maxMultiplePerOrder : -1,
        maxPrize : -1,
        maxRecord : -1,
        minMode : 1700,
        startPrice : 1.889,
        calculatePrize : Env.defaultCalculate,
        pageHtml :'<dl class="danqiu" id="hbg"><dd><h5>百个</h5>'
        + '<ul class="sz-qiu"><li id="hbg_zu_0">和</li>'
        +'</ul></dd></dl>',
        bettips : '选择和进行投注',
        betexample : '投注方案：例如投注和，开奖号为64535，即为中奖',
        bethelp : '玩法：开奖号码的百位数字大于个位数字则为龙；百位小于个位则为虎；百位等于个位则为和。',
        replaceCode:function(codes){
            codes=codes.replace(new RegExp('0', 'g'),"和");
            return codes;
        },
        vali : function() {
            if (!way.get(this.rulecode + ".count.zu")) {
                way.set("Lottery.itemcount", "0");
                way.set("Lottery.total", "0");
            } else if (way.get("Lottery.times")) {
                var itemcount = way.get(this.rulecode + ".count.zu");
                way.set("Lottery.itemcount", ""+itemcount);
                var total = itemcount * way.get("Lottery.times")
                    * way.get("http://www.yugj881.com/resources/main/lottery/Lottery.yjf") * Env.price;
                if (total)
                    way.set("Lottery.total", total.toFixed(4));
                else
                    way.set("Lottery.total", "0");
            } else {
                way.set("Lottery.total", "0");
            }


        },
        clear : function() {
            var ss = [ "zu" ];
            for (k = 0; k < 1; k++)
                for (i = 0; i <= 9; i++) {
                    var item = $("#hbg_" + ss[k] + "_" + i);
                    if (item.hasClass("cur")) {
                        item.trigger('click');
                    }
                }
        }
    },
    "hsg" : {
        showname : '十个',
        rulecode : 'hsg',
        realname : '[和_十个]',
        maxMultiplePerOrder : -1,
        maxPrize : -1,
        maxRecord : -1,
        minMode : 1700,
        startPrice : 1.889,
        calculatePrize : Env.defaultCalculate,
        pageHtml :'<dl class="danqiu" id="hsg"><dd><h5>十个</h5>'
        + '<ul class="sz-qiu"><li id="hsg_zu_0">和</li>'
        +'</ul></dd></dl>',
        bettips : '选择和进行投注',
        betexample : '投注方案：例如投注和，开奖号为64533，即为中奖',
        bethelp : '玩法：开奖号码的十位数字大于个位数字则为龙；十位小于个位则为虎；十位等于个位则为和。',
        replaceCode:function(codes){
            codes=codes.replace(new RegExp('0', 'g'),"和");
            return codes;
        },
        vali : function() {
            if (!way.get(this.rulecode + ".count.zu")) {
                way.set("Lottery.itemcount", "0");
                way.set("Lottery.total", "0");
            } else if (way.get("Lottery.times")) {
                var itemcount = way.get(this.rulecode + ".count.zu");
                way.set("Lottery.itemcount", ""+itemcount);
                var total = itemcount * way.get("Lottery.times")
                    * way.get("http://www.yugj881.com/resources/main/lottery/Lottery.yjf") * Env.price;
                if (total)
                    way.set("Lottery.total", total.toFixed(4));
                else
                    way.set("Lottery.total", "0");
            } else {
                way.set("Lottery.total", "0");
            }


        },
        clear : function() {
            var ss = [ "zu" ];
            for (k = 0; k < 1; k++)
                for (i = 0; i <= 9; i++) {
                    var item = $("#hsg_" + ss[k] + "_" + i);
                    if (item.hasClass("cur")) {
                        item.trigger('click');
                    }
                }
        }
    }

}
